Virtual layer-2 network

ABSTRACT

Systems and methods for a virtual layer-2 network are described herein. The method can include providing a virtual Layer 3 network in a virtualized cloud environment. The virtual Layer 3 network can be hosted by an underlying physical network. The method can include providing a virtual Layer 2 network in the virtualized cloud environment. The virtual Layer 2 network can be hosted by the underlying physical network.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims the benefit of the following applications:

-   -   (1) U.S. Provisional Application No. 63/051,728, filed on Jul.        14, 2020, and entitled “VLAN Switching And Routing Service And        Layer-2 Networking In A Virtualized Cloud Environment”, and    -   (2) U.S. Provisional Application No. 63/132,377, filed on Dec.        30, 2020, and entitled “Layer-2 Networking In A Virtualized        Cloud Environment”.        The entire contents of the above-referenced provisional        applications are hereby incorporated by reference herein for all        purposes.

This application is also related to U.S. application Ser. No.17/376,002, filed on Jul. 14, 2021, and entitled “SYSTEMS AND METHODSFOR A VLAN SWITCHING AND ROUTING SERVICE”, and this application is alsorelated to U.S. application Ser. No. 17/376,004, filed on Jul. 14, 2021,and entitled “INTERFACE-BASED ACLS IN A LAYER-2 NETWORK”, the entirecontents of each of which related applications are hereby incorporatedby reference herein for all purposes.

BACKGROUND

Cloud computing provides on-demand availability of computing resources.Cloud computing can be based on data centers that are available to usersover the internet. Cloud computing can provide Infrastructure as aService (IaaS). A virtual network may be created for use by users.However, these virtual networks have limitations that limit theirfunctionality and value. Accordingly, further improvements are desired.

BRIEF SUMMARY

One aspect of the present disclosure relates to a computer-implementedmethod. The method includes providing a virtual Layer 3 network in avirtualized cloud environment, the virtual Layer 3 network hosted by anunderlying physical network, and providing a virtual Layer 2 network inthe virtualized cloud environment, the virtual Layer 2 network hosted bythe underlying physical network.

In some embodiments, the virtual Layer 2 network can be a virtual localarea network (VLAN). In some embodiments, the VLAN includes a pluralityof endpoints. In some embodiments, the plurality of endpoints can be aplurality of compute instances. In some embodiments, the VLAN includes aplurality of L2 virtual network interface cards (L2 VNICs), and aplurality of switches.

In some embodiments, each of the plurality of compute instances iscommunicatingly coupled with a pair comprising a unique L2 virtualnetwork interface card (L2 VNIC) and a unique switch. In someembodiments, the plurality of switches together can form a distributedswitch. In some embodiments, each of the plurality of switches routesoutbound traffic according to a mapping table received from the L2 VNICpaired with the switch. In some embodiments, the mapping tableidentifies interface-to-MAC address mapping for the endpoints within theVLAN.

In some embodiments, the method further includes instantiating the paircomprising the unique L2 VNIC and the unique switch on a networkvirtualization device (NVD). In some embodiments, the method includesreceiving a packet addressed for one of the plurality of computeinstances at the unique L2 VNIC of one of the plurality of computeinstances from another endpoint within the VLAN, and learning with theunique L2 VNIC of the one of the plurality of compute instances mappingof the other endpoint. In some embodiments, the mapping of the otherendpoint includes interface-to-MAC address mapping of the otherendpoint.

In some embodiments, the method includes decapsulating the receivedpacket with the unique L2 VNIC of the one of the plurality of computeinstances, and forwarding the decapsulated packet to the one of theplurality of compute instances. In some embodiments, the method includeslearning with the one of the plurality of compute instances IPaddress-to-MAC address mapping of the other endpoint.

In some embodiments, the method includes sending an IP packet from afirst compute instance in the VLAN, the IP packet including adestination IP address of a second compute instance within the VLAN,receiving the IP packet at a first L2 VNIC associated with the firstcompute instance, encapsulating the IP packet at the first L2 VNIC, andforwarding the IP packet to the second compute instance via a firstswitch. In some embodiments, the first switch and the first L2 VNICtogether for the pair communicatingly coupled with the first computeinstance. In some embodiments, the method further includes receiving theIP packet at a second VNIC, which second VNIC is associated with thesecond compute instance, decapsulating the IP packet at the second VNIC,and forwarding the IP packet from the second VNIC to the second computeinstance.

In some embodiments, the virtual Layer 2 network includes a plurality ofvirtual local area networks (VLANs). In some embodiments, each of theplurality of VLANs includes a plurality of endpoints. In someembodiments, the plurality of VLANs includes a first VLAN and a secondVLAN. In some embodiments, the first VLAN includes a plurality of firstendpoints, and the second VLAN includes a plurality of second endpoints.In some embodiments, each of the plurality of VLANs has a uniqueidentifier. In some embodiments, one of the plurality of first endpointsin the first VLAN communicates with one of the plurality of secondendpoints in the second VLAN.

One aspect of the present disclosure relates to a system including aphysical network. The physical network includes at least one hostmachine and at least one network virtualization device. The physicalnetwork can provide a virtual Layer 3 network in a virtualized cloudenvironment, the virtual Layer 3 network hosted by an underlyingphysical network, and provide a virtual Layer 2 network in thevirtualized cloud environment, the virtual Layer 2 network hosted by theunderlying physical network.

One aspect of the present disclosure relates to a non-transitorycomputer-readable storage medium storing a plurality of instructionsexecutable by one or more processors. The plurality of instructions whenexecuted by the one or more processors cause the one or more processorsto provide a virtual Layer 3 network in a virtualized cloud environment,the virtual Layer 3 network hosted by an underlying physical network,and provide a virtual Layer 2 network in the virtualized cloudenvironment, the virtual Layer 2 network hosted by the underlyingphysical network.

One aspect of the present disclosure relates to a method includinggenerating a table for an instance of a VLAN switching and routingservice (VSRS), the VSRS coupling a first virtual layer 2 network with asecond network. In some embodiments the table contains informationidentifying IP addresses, MAC addresses, and virtual interfaceidentifiers for instances within the first virtual layer 2 network. Themethod includes receiving with the VSRS a packet from a first instancedesignated for delivery to a second instance within the first virtuallayer 2 network, identifying with the VSRS the second instance withinthe first virtual layer 2 network for delivery of the packet based oninformation received with the packet and information contained withinthe table, and delivering the packet to the identified second instance.

In some embodiments, the first virtual layer 2 network includes aplurality of instances. In some embodiments, the first virtual layer 2network includes a plurality of L2 virtual network interface cards (L2VNICs), and a plurality of switches. In some embodiments, each of theplurality of instances is communicatively coupled with a pair includinga unique L2 virtual network interface card (L2 VNIC) and a uniqueswitch.

In some embodiments, identifying with the VSRS the second instancewithin the first virtual layer 2 network for delivery of the packetbased on information received with the packet and information containedwithin the table includes determining with the VSRS that the table doesnot include mapping information for the second instance, suspending withthe VSRS delivery of the packet, broadcasting with the VSRS an ARPrequest to L2 VNICs in the first virtual layer 2 network, the ARPrequest containing an IP address of the second instance, and receivingwith the VSRS an ARP response from the L2 VNIC of the second instance.

In some embodiments, the method further includes updating the tablebased on the received ARP response. In some embodiments, the firstinstance is outside of the first virtual layer 2 network and is in thesecond network. In some embodiments, the second network can be an L3network. In some embodiments, the second network can be a second virtuallayer 2 network. In some embodiments, the table is generated based oncommunications received by the VSRS.

In some embodiments, the method includes instantiating the VSRS as aservice on a plurality of hardware nodes. In some embodiments, themethod includes distributing the table across the hardware nodes. Insome embodiments, the table distributed across the hardware nodes isaccessible by another VSRS instantiation. In some embodiments, the firstinstance is inside of the first virtual layer 2 network.

In some embodiments, the method includes receiving with the VSRS apacket from a third instance inside of the first virtual layer 2network. In some embodiments, the packet is designated for delivery to afourth instance outside the first virtual layer 2 network and forwardingthe packet to the fourth instance. In some embodiments, the methodincludes receiving with the VSRS a packet from a third instance insideof the first virtual layer 2 network. In some embodiments, the packet isdesignated for delivery to a service used by the third instance insidethe first virtual layer 2 network. In some embodiments, the service canbe at least one of: DHCP; NTP; and DNS.

In some embodiments, the method includes receiving with the VSRS apacket from a third instance inside of the first virtual layer 2network. In some embodiments, the packet is designated for delivery to afourth instance in a second virtual layer 2 network. In someembodiments, the method includes distributing the tables for theinstance of the VSRS with layer 2 and layer 3 network information acrossa fleet of service nodes to provide a highly reliable, and highlyscalable instantiation of a VSRS. In some embodiments, the methodcomprises receiving with the VSRS a packet from a third instance insidethe first virtual layer 2 network, and learning with the VSRS themapping of the third instance.

One aspect of the present disclosure relates to a system. The systemincludes a physical network. The physical network includes at least oneprocessor and a network virtualization device. The at least oneprocessor can instantiate an instance of a VLAN switching and routingservice (VSRS), the VSRS coupling a first virtual layer 2 network with asecond network, and generate a table for the instance of the VSRS. Insome embodiments, the table contains information identifying IPaddresses, MAC addresses, and virtual interface identifiers forinstances within the first virtual layer 2 network. The at least oneprocessor can receive with the VSRS a packet from a first instancedesignated for delivery to a second instance within the first virtuallayer 2 network, identify with the VSRS the second instance within thefirst virtual layer 2 network for delivery of the packet based oninformation received with the packet and information contained withinthe table, and deliver the packet to the identified second instance.

One aspect of the present disclosure relates to a non-transitorycomputer-readable storage medium storing a plurality of instructionsexecutable by one or more processors. The plurality of instructions whenexecuted by the one or more processors cause the one or more processorsto instantiate an instance of a VLAN switching and routing service(VSRS), the VSRS coupling a first virtual layer 2 network with a secondnetwork, and generate a table for the instance of the VSRS. In someembodiments, the table contains information identifying IP addresses,MAC addresses, and virtual interface identifiers for instances withinthe first virtual layer 2 network. The plurality of instructions whenexecuted by the one or more processors cause the one or more processorsto receive with the VSRS a packet from a first instance designated fordelivery to a second instance within the first virtual layer 2 network,identify with the VSRS the second instance within the first virtuallayer 2 network for delivery of the packet based on information receivedwith the packet and information contained within the table, and deliverthe packet to the identified second instance.

One aspect of the present disclosure relates to a method. The methodincludes sending a packet from source compute instance in a virtualnetwork to a destination compute instance via a destination L2 virtualnetwork interface card (destination L2 VNIC) within a first virtuallayer 2 network, evaluating an access control list (ACL) for the packetwith a source virtual network interface card (source VNIC), embeddingACL information relevant to the packet in the packet, forwarding theencapsulated packet to a virtual switching and routing service (VSRS),the VSRS coupling a first virtual layer 2 network (VLAN) with a secondnetwork, identifying with the VSRS the destination L2 VNIC within thefirst virtual layer 2 network for delivery of the packet based oninformation received with the packet and mapping information containedwithin a mapping table, accessing with the VSRS the ACL information fromthe packet, applying the accessed ACL information to the packet.

In some embodiments, the packet includes an IP packet. In someembodiments, the source compute instance is located in a virtual L3network. In some embodiments, the source compute instance is located ina second virtual layer 2 network.

In some embodiments, the method includes encapsulating the packet withthe source VNIC. In some embodiments, the method includes receiving anddecapsulating the packet with the VSRS. In some embodiments, identifyingwith the VSRS the destination L2 VNIC within the first virtual layer 2network for delivery of the packet based on information received withthe packet and mapping information contained within the mapping tableincludes determining with the VSRS that the mapping table does notinclude mapping information for the destination compute instance,suspending with the VSRS forwarding of the packet, broadcasting with theVSRS an ARP request to L2 VNICs in the first virtual layer 2 network,the ARP request containing an IP address of the destination computeinstance, and receiving with the VSRS an ARP response from the L2 VNICof the destination compute instance. In some embodiments, one of the L2VNICs is a L2 VNIC of the destination compute instance.

In some embodiments, the method includes updating the table based on thereceived ARP response. In some embodiments, identifying with the VSRSthe destination L2 VNIC within the first virtual layer 2 network fordelivery of the packet based on information received with the packet andmapping information contained within the mapping table includesdetermining that the mapping table includes mapping information for thedestination compute instance, and identifying the destination L2 VNICbased on the mapping information contained in the mapping table. In someembodiments, embedding ACL information relevant to the packet in thepacket comprises storing the ACL information as metadata in the packet.In some embodiments, accessing with the VSRS the ACL information fromthe packet includes extracting metadata containing the ACL informationin the packet.

In some embodiments, applying the accessed ACL information to the packetincludes determining that the ACL information is not relevant to thedestination L2 VNIC. In some embodiments, applying the accessed ACLinformation to the packet further includes forwarding the packet to thedestination compute instance via the destination L2 VNIC. In someembodiments, applying the accessed ACL information to the packetincludes determining with the VSRS that the ACL information is relevantto the destination L2 VNIC. In some embodiments, applying the accessedACL information to the packet further includes: determining with theVSRS that the destination L2 VNIC complies with the ACL information; andforwarding with the VSRS the packet to the destination compute instancevia the destination L2 VNIC.

In some embodiments, applying the accessed ACL information to the packetfurther includes: determining with the VSRS that the destination L2 VNICdoes not comply with the ACL information; and the VSRS dropping thepacket. In some embodiments, the accessed ACL information to the packetfurther includes sending with the VSRS a response to the source computeinstance indicating the dropping of the packet.

One aspect of the present disclosure relates to a system including thephysical network. The physical network includes at least one firstprocessor, a network virtualization device, and at least one secondprocessor. The at least one processor can send a packet from sourcecompute instance in a virtual network instantiated on the physicalnetwork to a destination compute instance via a destination L2 virtualnetwork interface card (destination L2 VNIC) within a first virtuallayer 2 network instantiated on the physical network. The networkvirtualization device can instantiate a source VNIC. The source VNIC canevaluate a access control list (ACL) for the packet, embed ACLinformation relevant to the packet in the packet, and forward the packetto a virtual switching and routing service (VSRS), the VSRS coupling afirst virtual layer 2 network (VLAN) with a second network. The at leastone second processor can instantiate the VSRS. The VSRS can identify thedestination L2 VNIC for delivery of the packet based on informationreceived with the packet and mapping information contained within amapping table, access the ACL information from the packet, and apply theaccessed ACL information to the packet.

In some embodiments, applying the accessed ACL information to the packetincludes determining that the ACL information is relevant to thedestination L2 VNIC, determining that the destination L2 VNIC complieswith the ACL information, and forwarding with the VSRS the packet to thedestination compute instance via the destination L2 VNIC.

One aspect of the present disclosure relates to a non-transitorycomputer-readable storage medium storing a plurality of instructionsexecutable by one or more processors. The plurality of instructions whenexecuted by the one or more processors cause the one or more processorsto send a packet from source compute instance in a virtual network to adestination compute instance via a destination L2 virtual networkinterface card (destination L2 VNIC) within a first virtual layer 2network, evaluate an access control list (ACL) for the packet with asource virtual network interface card (source VNIC), embed ACLinformation relevant to the packet in the packet, forward the packet toa virtual switching and routing service (VSRS), the VSRS coupling afirst virtual layer 2 network (VLAN) with a second network, identifywith the VSRS the destination L2 VNIC within the first virtual layer 2network for delivery of the packet based on information received withthe packet and mapping information contained within a mapping table,access with the VSRS the ACL information from the packet; and apply theaccessed ACL information to the packet.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a high level diagram of a distributed environment showing avirtual or overlay cloud network hosted by a cloud service providerinfrastructure according to certain embodiments.

FIG. 2 depicts a simplified architectural diagram of the physicalcomponents in the physical network within CSPI according to certainembodiments.

FIG. 3 shows an example arrangement within CSPI where a host machine isconnected to multiple network virtualization devices (NVDs) according tocertain embodiments.

FIG. 4 depicts connectivity between a host machine and an NVD forproviding I/O virtualization for supporting multitenancy according tocertain embodiments.

FIG. 5 depicts a simplified block diagram of a physical network providedby a CSPI according to certain embodiments.

FIG. 6 is a schematic illustration of one embodiment of a computingnetwork.

FIG. 7 is a logical and hardware schematic illustration of virtual localarea network (VLAN).

FIG. 8 is a logical schematic illustration of multiple connected L2VLANs.

FIG. 9 is a logical schematic illustration of multiple connected L2VLANs and a subnet.

FIG. 10 is a schematic illustration of one embodiment of intra-VLANcommunication and learning within a VLAN.

FIG. 11 is a schematic illustration of an embodiment of animplementation view of a VLAN.

FIG. 12 is a flowchart illustrating one embodiment of a process forintra-VLAN communication.

FIG. 13 is a schematic illustration of the process for intra-VLANcommunication.

FIG. 14 is a flowchart illustrating one embodiment of a process forinter-VLAN communication in a virtual L2 network.

FIG. 15 is a schematic illustration of the process for inter-VLANcommunication.

FIG. 16 is a flowchart illustrating one embodiment of a process foringress packet flow.

FIG. 17 is a schematic illustration of the process for ingresscommunication.

FIG. 18 is a flowchart illustrating one embodiment of a process foregress packet flow from a VLAN.

FIG. 19 is a schematic illustration of the process for egress packetflow.

FIG. 20 is a flowchart illustrating one embodiment of a process fordelayed Access Control List (ACL) classification.

FIG. 21 is a flowchart illustrating one embodiment of a process forearly classification of an ACL.

FIG. 22 is a flowchart illustrating one embodiment of a process forsender-based next hop routing.

FIG. 23 is a flowchart illustrating one embodiment of a process fordelayed next hop routing.

FIG. 24 is a block diagram illustrating one pattern for implementing acloud infrastructure as a service system, according to at least oneembodiment.

FIG. 25 is a block diagram illustrating another pattern for implementinga cloud infrastructure as a service system, according to at least oneembodiment.

FIG. 26 is a block diagram illustrating another pattern for implementinga cloud infrastructure as a service system, according to at least oneembodiment.

FIG. 27 is a block diagram illustrating another pattern for implementinga cloud infrastructure as a service system, according to at least oneembodiment.

FIG. 28 is a block diagram illustrating an example computer system,according to at least one embodiment.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, specificdetails are set forth in order to provide a thorough understanding ofcertain embodiments. However, it will be apparent that variousembodiments may be practiced without these specific details. The figuresand description are not intended to be restrictive. The word “exemplary”is used herein to mean “serving as an example, instance, orillustration.” Any embodiment or design described herein as “exemplary”is not necessarily to be construed as preferred or advantageous overother embodiments or designs.

Example Virtual Networking Architecture

The term cloud service is generally used to refer to a service that ismade available by a cloud services provider (CSP) to users or customerson demand (e.g., via a subscription model) using systems andinfrastructure (cloud infrastructure) provided by the CSP. Typically,the servers and systems that make up the CSP's infrastructure areseparate from the customer's own on-premise servers and systems.Customers can thus avail themselves of cloud services provided by theCSP without having to purchase separate hardware and software resourcesfor the services. Cloud services are designed to provide a subscribingcustomer easy, scalable access to applications and computing resourceswithout the customer having to invest in procuring the infrastructurethat is used for providing the services.

There are several cloud service providers that offer various types ofcloud services. There are various different types or models of cloudservices including Software-as-a-Service (SaaS), Platform-as-a-Service(PaaS), Infrastructure-as-a-Service (IaaS), and others.

A customer can subscribe to one or more cloud services provided by aCSP. The customer can be any entity such as an individual, anorganization, an enterprise, and the like. When a customer subscribes toor registers for a service provided by a CSP, a tenancy or an account iscreated for that customer. The customer can then, via this account,access the subscribed-to one or more cloud resources associated with theaccount.

As noted above, infrastructure as a service (IaaS) is one particulartype of cloud computing service. In an IaaS model, the CSP providesinfrastructure (referred to as cloud services provider infrastructure orCSPI) that can be used by customers to build their own customizablenetworks and deploy customer resources. The customer's resources andnetworks are thus hosted in a distributed environment by infrastructureprovided by a CSP. This is different from traditional computing, wherethe customer's resources and networks are hosted by infrastructureprovided by the customer.

The CSPI may comprise interconnected high-performance compute resourcesincluding various host machines, memory resources, and network resourcesthat form a physical network, which is also referred to as a substratenetwork or an underlay network. The resources in CSPI may be spreadacross one or more data centers that may be geographically spread acrossone or more geographical regions. Virtualization software may beexecuted by these physical resources to provide a virtualizeddistributed environment. The virtualization creates an overlay network(also known as a software-based network, a software-defined network, ora virtual network) over the physical network. The CSPI physical networkprovides the underlying basis for creating one or more overlay orvirtual networks on top of the physical network. The physical network(or substrate network or underlay network) comprises physical networkdevices such as physical switches, routers, computers and host machines,and the like. An overlay network is a logical (or virtual) network thatruns on top of a physical substrate network. A given physical networkcan support one or multiple overlay networks. Overlay networks typicallyuse encapsulation techniques to differentiate between traffic belongingto different overlay networks. A virtual or overlay network is alsoreferred to as a virtual cloud network (VCN). The virtual networks areimplemented using software virtualization technologies (e.g.,hypervisors, virtualization functions implemented by networkvirtualization devices (NVDs) (e.g., smartNICs), top-of-rack (TOR)switches, smart TORs that implement one or more functions performed byan NVD, and other mechanisms) to create layers of network abstractionthat can be run on top of the physical network. Virtual networks cantake on many forms, including peer-to-peer networks, IP networks, andothers. Virtual networks are typically either Layer-3 IP networks orLayer-2 VLANs. This method of virtual or overlay networking is oftenreferred to as virtual or overlay Layer-3 networking. Examples ofprotocols developed for virtual networks include IP-in-IP (or GenericRouting Encapsulation (GRE)), Virtual Extensible LAN (VXLAN—IETF RFC7348), Virtual Private Networks (VPNs) (e.g., MPLS Layer-3 VirtualPrivate Networks (RFC 4364)), VMware's NSX, GENEVE (Generic NetworkVirtualization Encapsulation), and others.

For IaaS, the infrastructure (CSPI) provided by a CSP can be configuredto provide virtualized computing resources over a public network (e.g.,the Internet). In an IaaS model, a cloud computing services provider canhost the infrastructure components (e.g., servers, storage devices,network nodes (e.g., hardware), deployment software, platformvirtualization (e.g., a hypervisor layer), or the like). In some cases,an IaaS provider may also supply a variety of services to accompanythose infrastructure components (e.g., billing, monitoring, logging,security, load balancing and clustering, etc.). Thus, as these servicesmay be policy-driven, IaaS users may be able to implement policies todrive load balancing to maintain application availability andperformance. CSPI provides infrastructure and a set of complementarycloud services that enable customers to build and run a wide range ofapplications and services in a highly available hosted distributedenvironment. CSPI offers high-performance compute resources andcapabilities and storage capacity in a flexible virtual network that issecurely accessible from various networked locations such as from acustomer's on-premises network. When a customer subscribes to orregisters for an IaaS service provided by a CSP, the tenancy created forthat customer is a secure and isolated partition within the CSPI wherethe customer can create, organize, and administer their cloud resources.

Customers can build their own virtual networks using compute, memory,and networking resources provided by CSPI. One or more customerresources or workloads, such as compute instances, can be deployed onthese virtual networks. For example, a customer can use resourcesprovided by CSPI to build one or multiple customizable and privatevirtual network(s) referred to as virtual cloud networks (VCNs). Acustomer can deploy one or more customer resources, such as computeinstances, on a customer VCN. Compute instances can take the form ofvirtual machines, bare metal instances, and the like. The CSPI thusprovides infrastructure and a set of complementary cloud services thatenable customers to build and run a wide range of applications andservices in a highly available virtual hosted environment. The customerdoes not manage or control the underlying physical resources provided byCSPI but has control over operating systems, storage, and deployedapplications; and possibly limited control of select networkingcomponents (e.g., firewalls).

The CSP may provide a console that enables customers and networkadministrators to configure, access, and manage resources deployed inthe cloud using CSPI resources. In certain embodiments, the consoleprovides a web-based user interface that can be used to access andmanage CSPI. In some implementations, the console is a web-basedapplication provided by the CSP.

CSPI may support single-tenancy or multi-tenancy architectures. In asingle tenancy architecture, a software (e.g., an application, adatabase) or a hardware component (e.g., a host machine or a server)serves a single customer or tenant. In a multi-tenancy architecture, asoftware or a hardware component serves multiple customers or tenants.Thus, in a multi-tenancy architecture, CSPI resources are shared betweenmultiple customers or tenants. In a multi-tenancy situation, precautionsare taken and safeguards put in place within CSPI to ensure that eachtenant's data is isolated and remains invisible to other tenants.

In a physical network, a network endpoint (“endpoint”) refers to acomputing device or system that is connected to a physical network andcommunicates back and forth with the network to which it is connected. Anetwork endpoint in the physical network may be connected to a LocalArea Network (LAN), a Wide Area Network (WAN), or other type of physicalnetwork. Examples of traditional endpoints in a physical network includemodems, hubs, bridges, switches, routers, and other networking devices,physical computers (or host machines), and the like. Each physicaldevice in the physical network has a fixed network address that can beused to communicate with the device. This fixed network address can be aLayer-2 address (e.g., a MAC address), a fixed Layer-3 address (e.g., anIP address), and the like. In a virtualized environment or in a virtualnetwork, the endpoints can include various virtual endpoints such asvirtual machines that are hosted by components of the physical network(e.g., hosted by physical host machines). These endpoints in the virtualnetwork are addressed by overlay addresses such as overlay Layer-2addresses (e.g., overlay MAC addresses) and overlay Layer-3 addresses(e.g., overlay IP addresses). Network overlays enable flexibility byallowing network managers to move around the overlay addressesassociated with network endpoints using software management (e.g., viasoftware implementing a control plane for the virtual network).Accordingly, unlike in a physical network, in a virtual network, anoverlay address (e.g., an overlay IP address) can be moved from oneendpoint to another using network management software. Since the virtualnetwork is built on top of a physical network, communications betweencomponents in the virtual network involves both the virtual network andthe underlying physical network. In order to facilitate suchcommunications, the components of CSPI are configured to learn and storemappings that map overlay addresses in the virtual network to actualphysical addresses in the substrate network, and vice versa. Thesemappings are then used to facilitate the communications. Customertraffic is encapsulated to facilitate routing in the virtual network.

Accordingly, physical addresses (e.g., physical IP addresses) areassociated with components in physical networks and overlay addresses(e.g., overlay IP addresses) are associated with entities in virtual oroverlay networks. A physical IP address is an IP address associated witha physical device (e.g., a network device) in the substrate or physicalnetwork. For example, each NVD has an associated physical IP address. Anoverlay IP address is an overlay address associated with an entity in anoverlay network, such as with a compute instance in a customer's virtualcloud network (VCN). Two different customers or tenants, each with theirown private VCNs can potentially use the same overlay IP address intheir VCNs without any knowledge of each other. Both the physical IPaddresses and overlay IP addresses are types of real IP addresses. Theseare separate from virtual IP addresses. A virtual IP address istypically a single IP address that represents or maps to multiple realIP addresses. A virtual IP address provides a 1-to-many mapping betweenthe virtual IP address and multiple real IP addresses. For example, aload balancer may user a VIP to map to or represent multiple server,each server having its own real IP address.

The cloud infrastructure or CSPI is physically hosted in one or moredata centers in one or more regions around the world. The CSPI mayinclude components in the physical or substrate network and virtualizedcomponents (e.g., virtual networks, compute instances, virtual machines,etc.) that are in an virtual network built on top of the physicalnetwork components. In certain embodiments, the CSPI is organized andhosted in realms, regions and availability domains. A region istypically a localized geographic area that contains one or more datacenters. Regions are generally independent of each other and can beseparated by vast distances, for example, across countries or evencontinents. For example, a first region may be in Australia, another onein Japan, yet another one in India, and the like. CSPI resources aredivided among regions such that each region has its own independentsubset of CSPI resources. Each region may provide a set of coreinfrastructure services and resources, such as, compute resources (e.g.,bare metal servers, virtual machine, containers and relatedinfrastructure, etc.); storage resources (e.g., block volume storage,file storage, object storage, archive storage); networking resources(e.g., virtual cloud networks (VCNs), load balancing resources,connections to on-premise networks), database resources; edge networkingresources (e.g., DNS); and access management and monitoring resources,and others. Each region generally has multiple paths connecting it toother regions in the realm.

Generally, an application is deployed in a region (i.e., deployed oninfrastructure associated with that region) where it is most heavilyused, because using nearby resources is faster than using distantresources. Applications can also be deployed in different regions forvarious reasons, such as redundancy to mitigate the risk of region-wideevents such as large weather systems or earthquakes, to meet varyingrequirements for legal jurisdictions, tax domains, and other business orsocial criteria, and the like.

The data centers within a region can be further organized and subdividedinto availability domains (ADs). An availability domain may correspondto one or more data centers located within a region. A region can becomposed of one or more availability domains. In such a distributedenvironment, CSPI resources are either region-specific, such as avirtual cloud network (VCN), or availability domain-specific, such as acompute instance.

ADs within a region are isolated from each other, fault tolerant, andare configured such that they are very unlikely to fail simultaneously.This is achieved by the ADs not sharing critical infrastructureresources such as networking, physical cables, cable paths, cable entrypoints, etc., such that a failure at one AD within a region is unlikelyto impact the availability of the other ADs within the same region. TheADs within the same region may be connected to each other by a lowlatency, high bandwidth network, which makes it possible to providehigh-availability connectivity to other networks (e.g., the Internet,customers' on-premise networks, etc.) and to build replicated systems inmultiple ADs for both high-availability and disaster recovery. Cloudservices use multiple ADs to ensure high availability and to protectagainst resource failure. As the infrastructure provided by the IaaSprovider grows, more regions and ADs may be added with additionalcapacity. Traffic between availability domains is usually encrypted.

In certain embodiments, regions are grouped into realms. A realm is alogical collection of regions. Realms are isolated from each other anddo not share any data. Regions in the same realm may communicate witheach other, but regions in different realms cannot. A customer's tenancyor account with the CSP exists in a single realm and can be spreadacross one or more regions that belong to that realm. Typically, when acustomer subscribes to an IaaS service, a tenancy or account is createdfor that customer in the customer-specified region (referred to as the“home” region) within a realm. A customer can extend the customer'stenancy across one or more other regions within the realm. A customercannot access regions that are not in the realm where the customer'stenancy exists.

An IaaS provider can provide multiple realms, each realm catered to aparticular set of customers or users. For example, a commercial realmmay be provided for commercial customers. As another example, a realmmay be provided for a specific country for customers within thatcountry. As yet another example, a government realm may be provided fora government, and the like. For example, the government realm may becatered for a specific government and may have a heightened level ofsecurity than a commercial realm. For example, Oracle CloudInfrastructure (OCI) currently offers a realm for commercial regions andtwo realms (e.g., FedRAMP authorized and IL5 authorized) for governmentcloud regions.

In certain embodiments, an AD can be subdivided into one or more faultdomains. A fault domain is a grouping of infrastructure resources withinan AD to provide anti-affinity. Fault domains allow for the distributionof compute instances such that the instances are not on the samephysical hardware within a single AD. This is known as anti-affinity. Afault domain refers to a set of hardware components (computers,switches, and more) that share a single point of failure. A compute poolis logically divided up into fault domains. Due to this, a hardwarefailure or compute hardware maintenance event that affects one faultdomain does not affect instances in other fault domains. Depending onthe embodiment, the number of fault domains for each AD may vary. Forinstance, in certain embodiments each AD contains three fault domains. Afault domain acts as a logical data center within an AD.

When a customer subscribes to an IaaS service, resources from CSPI areprovisioned for the customer and associated with the customer's tenancy.The customer can use these provisioned resources to build privatenetworks and deploy resources on these networks. The customer networksthat are hosted in the cloud by the CSPI are referred to as virtualcloud networks (VCNs). A customer can set up one or more virtual cloudnetworks (VCNs) using CSPI resources allocated for the customer. A VCNis a virtual or software defined private network. The customer resourcesthat are deployed in the customer's VCN can include compute instances(e.g., virtual machines, bare-metal instances) and other resources.These compute instances may represent various customer workloads such asapplications, load balancers, databases, and the like. A computeinstance deployed on a VCN can communicate with public accessibleendpoints (“public endpoints”) over a public network such as theInternet, with other instances in the same VCN or other VCNs (e.g., thecustomer's other VCNs, or VCNs not belonging to the customer), with thecustomer's on-premise data centers or networks, and with serviceendpoints, and other types of endpoints.

The CSP may provide various services using the CSPI. In some instances,customers of CSPI may themselves act like service providers and provideservices using CSPI resources. A service provider may expose a serviceendpoint, which is characterized by identification information (e.g., anIP Address, a DNS name and port). A customer's resource (e.g., a computeinstance) can consume a particular service by accessing a serviceendpoint exposed by the service for that particular service. Theseservice endpoints are generally endpoints that are publicly accessibleby users using public IP addresses associated with the endpoints via apublic communication network such as the Internet. Network endpointsthat are publicly accessible are also sometimes referred to as publicendpoints.

In certain embodiments, a service provider may expose a service via anendpoint (sometimes referred to as a service endpoint) for the service.Customers of the service can then use this service endpoint to accessthe service. In certain implementations, a service endpoint provided fora service can be accessed by multiple customers that intend to consumethat service. In other implementations, a dedicated service endpoint maybe provided for a customer such that only that customer can access theservice using that dedicated service endpoint.

In certain embodiments, when a VCN is created, it is associated with aprivate overlay Classless Inter-Domain Routing (CIDR) address space,which is a range of private overlay IP addresses that are assigned tothe VCN (e.g., 10.0/16). A VCN includes associated subnets, routetables, and gateways. A VCN resides within a single region but can spanone or more or all of the region's availability domains. A gateway is avirtual interface that is configured for a VCN and enables communicationof traffic to and from the VCN to one or more endpoints outside the VCN.One or more different types of gateways may be configured for a VCN toenable communication to and from different types of endpoints.

A VCN can be subdivided into one or more sub-networks such as one ormore subnets. A subnet is thus a unit of configuration or a subdivisionthat can be created within a VCN. A VCN can have one or multiplesubnets. Each subnet within a VCN is associated with a contiguous rangeof overlay IP addresses (e.g., 10.0.0.0/24 and 10.0.1.0/24) that do notoverlap with other subnets in that VCN and which represent an addressspace subset within the address space of the VCN.

Each compute instance is associated with a virtual network interfacecard (VNIC), that enables the compute instance to participate in asubnet of a VCN. A VNIC is a logical representation of physical NetworkInterface Card (NIC). In general. a VNIC is an interface between anentity (e.g., a compute instance, a service) and a virtual network. AVNIC exists in a subnet, has one or more associated IP addresses, andassociated security rules or policies. A VNIC is equivalent to a Layer-2port on a switch. A VNIC is attached to a compute instance and to asubnet within a VCN. A VNIC associated with a compute instance enablesthe compute instance to be a part of a subnet of a VCN and enables thecompute instance to communicate (e.g., send and receive packets) withendpoints that are on the same subnet as the compute instance, withendpoints in different subnets in the VCN, or with endpoints outside theVCN. The VNIC associated with a compute instance thus determines how thecompute instance connects with endpoints inside and outside the VCN. AVNIC for a compute instance is created and associated with that computeinstance when the compute instance is created and added to a subnetwithin a VCN. For a subnet comprising a set of compute instances, thesubnet contains the VNICs corresponding to the set of compute instances,each VNIC attached to a compute instance within the set of computerinstances.

Each compute instance is assigned a private overlay IP address via theVNIC associated with the compute instance. This private overlay IPaddress is assigned to the VNIC that is associated with the computeinstance when the compute instance is created and used for routingtraffic to and from the compute instance. All VNICs in a given subnetuse the same route table, security lists, and DHCP options. As describedabove, each subnet within a VCN is associated with a contiguous range ofoverlay IP addresses (e.g., 10.0.0.0/24 and 10.0.1.0/24) that do notoverlap with other subnets in that VCN and which represent an addressspace subset within the address space of the VCN. For a VNIC on aparticular subnet of a VCN, the private overlay IP address that isassigned to the VNIC is an address from the contiguous range of overlayIP addresses allocated for the subnet.

In certain embodiments, a compute instance may optionally be assignedadditional overlay IP addresses in addition to the private overlay IPaddress, such as, for example, one or more public IP addresses if in apublic subnet. These multiple addresses are assigned either on the sameVNIC or over multiple VNICs that are associated with the computeinstance. Each instance however has a primary VNIC that is createdduring instance launch and is associated with the overlay private IPaddress assigned to the instance—this primary VNIC cannot be removed.Additional VNICs, referred to as secondary VNICs, can be added to anexisting instance in the same availability domain as the primary VNIC.All the VNICs are in the same availability domain as the instance. Asecondary VNIC can be in a subnet in the same VCN as the primary VNIC,or in a different subnet that is either in the same VCN or a differentone.

A compute instance may optionally be assigned a public IP address if itis in a public subnet. A subnet can be designated as either a publicsubnet or a private subnet at the time the subnet is created. A privatesubnet means that the resources (e.g., compute instances) and associatedVNICs in the subnet cannot have public overlay IP addresses. A publicsubnet means that the resources and associated VNICs in the subnet canhave public IP addresses. A customer can designate a subnet to existeither in a single availability domain or across multiple availabilitydomains in a region or realm.

As described above, a VCN may be subdivided into one or more subnets. Incertain embodiments, a Virtual Router (VR) configured for the VCN(referred to as the VCN VR or just VR) enables communications betweenthe subnets of the VCN. For a subnet within a VCN, the VR represents alogical gateway for that subnet that enables the subnet (i.e., thecompute instances on that subnet) to communicate with endpoints on othersubnets within the VCN, and with other endpoints outside the VCN. TheVCN VR is a logical entity that is configured to route traffic betweenVNICs in the VCN and virtual gateways (“gateways”) associated with theVCN. Gateways are further described below with respect to FIG. 1 . A VCNVR is a Layer-3/IP Layer concept. In one embodiment, there is one VCN VRfor a VCN where the VCN VR has potentially an unlimited number of portsaddressed by IP addresses, with one port for each subnet of the VCN. Inthis manner, the VCN VR has a different IP address for each subnet inthe VCN that the VCN VR is attached to. The VR is also connected to thevarious gateways configured for a VCN. In certain embodiments, aparticular overlay IP address from the overlay IP address range for asubnet is reserved for a port of the VCN VR for that subnet. Forexample, consider a VCN having two subnets with associated addressranges 10.0/16 and 10.1/16, respectively. For the first subnet withinthe VCN with address range 10.0/16, an address from this range isreserved for a port of the VCN VR for that subnet. In some instances,the first IP address from the range may be reserved for the VCN VR. Forexample, for the subnet with overlay IP address range 10.0/16, IPaddress 10.0.0.1 may be reserved for a port of the VCN VR for thatsubnet. For the second subnet within the same VCN with address range10.1/16, the VCN VR may have a port for that second subnet with IPaddress 10.1.0.1. The VCN VR has a different IP address for each of thesubnets in the VCN.

In some other embodiments, each subnet within a VCN may have its ownassociated VR that is addressable by the subnet using a reserved ordefault IP address associated with the VR. The reserved or default IPaddress may, for example, be the first IP address from the range of IPaddresses associated with that subnet. The VNICs in the subnet cancommunicate (e.g., send and receive packets) with the VR associated withthe subnet using this default or reserved IP address. In such anembodiment, the VR is the ingress/egress point for that subnet. The VRassociated with a subnet within the VCN can communicate with other VRsassociated with other subnets within the VCN. The VRs can alsocommunicate with gateways associated with the VCN. The VR function for asubnet is running on or executed by one or more NVDs executing VNICsfunctionality for VNICs in the subnet.

Route tables, security rules, and DHCP options may be configured for aVCN. Route tables are virtual route tables for the VCN and include rulesto route traffic from subnets within the VCN to destinations outside theVCN by way of gateways or specially configured instances. A VCN's routetables can be customized to control how packets are forwarded/routed toand from the VCN. DHCP options refers to configuration information thatis automatically provided to the instances when they boot up.

Security rules configured for a VCN represent overlay firewall rules forthe VCN. The security rules can include ingress and egress rules, andspecify the types of traffic (e.g., based upon protocol and port) thatis allowed in and out of the instances within the VCN. The customer canchoose whether a given rule is stateful or stateless. For instance, thecustomer can allow incoming SSH traffic from anywhere to a set ofinstances by setting up a stateful ingress rule with source CIDR0.0.0.0/0, and destination TCP port 22. Security rules can beimplemented using network security groups or security lists. A networksecurity group consists of a set of security rules that apply only tothe resources in that group. A security list, on the other hand,includes rules that apply to all the resources in any subnet that usesthe security list. A VCN may be provided with a default security listwith default security rules. DHCP options configured for a VCN provideconfiguration information that is automatically provided to theinstances in the VCN when the instances boot up.

In certain embodiments, the configuration information for a VCN isdetermined and stored by a VCN Control Plane. The configurationinformation for a VCN may include, for example, information about: theaddress range associated with the VCN, subnets within the VCN andassociated information, one or more VRs associated with the VCN, computeinstances in the VCN and associated VNICs, NVDs executing the variousvirtualization network functions (e.g., VNICs, VRs, gateways) associatedwith the VCN, state information for the VCN, and other VCN-relatedinformation. In certain embodiments, a VCN Distribution Servicepublishes the configuration information stored by the VCN Control Plane,or portions thereof, to the NVDs. The distributed information may beused to update information (e.g., forwarding tables, routing tables,etc.) stored and used by the NVDs to forward packets to and from thecompute instances in the VCN.

In certain embodiments, the creation of VCNs and subnets are handled bya VCN Control Plane (CP) and the launching of compute instances ishandled by a Compute Control Plane. The Compute Control Plane isresponsible for allocating the physical resources for the computeinstance and then calls the VCN Control Plane to create and attach VNICsto the compute instance. The VCN CP also sends VCN data mappings to theVCN data plane that is configured to perform packet forwarding androuting functions. In certain embodiments, the VCN CP provides adistribution service that is responsible for providing updates to theVCN data plane. Examples of a VCN Control Plane are also depicted inFIGS. 24, 25, 26, and 27 (see references 24116, 2516, 2616, and 2716)and described below.

A customer may create one or more VCNs using resources hosted by CSPI. Acompute instance deployed on a customer VCN may communicate withdifferent endpoints. These endpoints can include endpoints that arehosted by CSPI and endpoints outside CSPI.

Various different architectures for implementing cloud-based serviceusing CSPI are depicted in FIGS. 1, 2, 3, 4, 5, 24, 25, 26, and 28 , andare described below. FIG. 1 is a high level diagram of a distributedenvironment 100 showing an overlay or customer VCN hosted by CSPIaccording to certain embodiments. The distributed environment depictedin FIG. 1 includes multiple components in the overlay network.Distributed environment 100 depicted in FIG. 1 is merely an example andis not intended to unduly limit the scope of claimed embodiments. Manyvariations, alternatives, and modifications are possible. For example,in some implementations, the distributed environment depicted in FIG. 1may have more or fewer systems or components than those shown in FIG. 1, may combine two or more systems, or may have a different configurationor arrangement of systems.

As shown in the example depicted in FIG. 1 , distributed environment 100comprises CSPI 101 that provides services and resources that customerscan subscribe to and use to build their virtual cloud networks (VCNs).In certain embodiments, CSPI 101 offers IaaS services to subscribingcustomers. The data centers within CSPI 101 may be organized into one ormore regions. One example region “Region US” 102 is shown in FIG. 1 . Acustomer has configured a customer VCN 104 for region 102. The customermay deploy various compute instances on VCN 104, where the computeinstances may include virtual machines or bare metal instances. Examplesof instances include applications, database, load balancers, and thelike.

In the embodiment depicted in FIG. 1 , customer VCN 104 comprises twosubnets, namely, “Subnet-1” and “Subnet-2”, each subnet with its ownCIDR IP address range. In FIG. 1 , the overlay IP address range forSubnet-1 is 10.0/16 and the address range for Subnet-2 is 10.1/16. A VCNVirtual Router 105 represents a logical gateway for the VCN that enablescommunications between subnets of the VCN 104, and with other endpointsoutside the VCN. VCN VR 105 is configured to route traffic between VNICsin VCN 104 and gateways associated with VCN 104. VCN VR 105 provides aport for each subnet of VCN 104. For example, VR 105 may provide a portwith IP address 10.0.0.1 for Subnet-1 and a port with IP address10.1.0.1 for Subnet-2.

Multiple compute instances may be deployed on each subnet, where thecompute instances can be virtual machine instances, and/or bare metalinstances. The compute instances in a subnet may be hosted by one ormore host machines within CSPI 101. A compute instance participates in asubnet via a VNIC associated with the compute instance. For example, asshown in FIG. 1 , a compute instance C1 is part of Subnet-1 via a VNICassociated with the compute instance. Likewise, compute instance C2 ispart of Subnet-1 via a VNIC associated with C2. In a similar manner,multiple compute instances, which may be virtual machine instances orbare metal instances, may be part of Subnet-1. Via its associated VNIC,each compute instance is assigned a private overlay IP address and aMedia access control address (MAC address). For example, in FIG. 1 ,compute instance C1 has an overlay IP address of 10.0.0.2 and a MACaddress of M1, while compute instance C2 has an private overlay IPaddress of 10.0.0.3 and a MAC address of M2. Each compute instance inSubnet-1, including compute instances C1 and C2, has a default route toVCN VR 105 using IP address 10.0.0.1, which is the IP address for a portof VCN VR 105 for Subnet-1.

Subnet-2 can have multiple compute instances deployed on it, includingvirtual machine instances and/or bare metal instances. For example, asshown in FIG. 1 , compute instances D1 and D2 are part of Subnet-2 viaVNICs associated with the respective compute instances. In theembodiment depicted in FIG. 1 , compute instance D1 has an overlay IPaddress of 10.1.0.2 and a MAC address of MM1, while compute instance D2has an private overlay IP address of 10.1.0.3 and a MAC address of MM2.Each compute instance in Subnet-2, including compute instances D1 andD2, has a default route to VCN VR 105 using IP address 10.1.0.1, whichis the IP address for a port of VCN VR 105 for Subnet-2.

VCN A 104 may also include one or more load balancers. For example, aload balancer may be provided for a subnet and may be configured to loadbalance traffic across multiple compute instances on the subnet. A loadbalancer may also be provided to load balance traffic across subnets inthe VCN.

A particular compute instance deployed on VCN 104 can communicate withvarious different endpoints. These endpoints may include endpoints thatare hosted by CSPI 200 and endpoints outside CSPI 200. Endpoints thatare hosted by CSPI 101 may include: an endpoint on the same subnet asthe particular compute instance (e.g., communications between twocompute instances in Subnet-1); an endpoint on a different subnet butwithin the same VCN (e.g., communication between a compute instance inSubnet-1 and a compute instance in Subnet-2); an endpoint in a differentVCN in the same region (e.g., communications between a compute instancein Subnet-1 and an endpoint in a VCN in the same region 106 or 110,communications between a compute instance in Subnet-1 and an endpoint inservice network 110 in the same region); or an endpoint in a VCN in adifferent region (e.g., communications between a compute instance inSubnet-1 and an endpoint in a VCN in a different region 108). A computeinstance in a subnet hosted by CSPI 101 may also communicate withendpoints that are not hosted by CSPI 101 (i.e., are outside CSPI 101).These outside endpoints include endpoints in the customer's on-premisenetwork 116, endpoints within other remote cloud hosted networks 118,public endpoints 114 accessible via a public network such as theInternet, and other endpoints.

Communications between compute instances on the same subnet arefacilitated using VNICs associated with the source compute instance andthe destination compute instance. For example, compute instance C1 inSubnet-1 may want to send packets to compute instance C2 in Subnet-1.For a packet originating at a source compute instance and whosedestination is another compute instance in the same subnet, the packetis first processed by the VNIC associated with the source computeinstance. Processing performed by the VNIC associated with the sourcecompute instance can include determining destination information for thepacket from the packet headers, identifying any policies (e.g., securitylists) configured for the VNIC associated with the source computeinstance, determining a next hop for the packet, performing any packetencapsulation/decapsulation functions as needed, and thenforwarding/routing the packet to the next hop with the goal offacilitating communication of the packet to its intended destination.When the destination compute instance is in the same subnet as thesource compute instance, the VNIC associated with the source computeinstance is configured to identify the VNIC associated with thedestination compute instance and forward the packet to that VNIC forprocessing. The VNIC associated with the destination compute instance isthen executed and forwards the packet to the destination computeinstance.

For a packet to be communicated from a compute instance in a subnet toan endpoint in a different subnet in the same VCN, the communication isfacilitated by the VNICs associated with the source and destinationcompute instances and the VCN VR. For example, if compute instance C1 inSubnet-1 in FIG. 1 wants to send a packet to compute instance D1 inSubnet-2, the packet is first processed by the VNIC associated withcompute instance C1. The VNIC associated with compute instance C1 isconfigured to route the packet to the VCN VR 105 using default route orport 10.0.0.1 of the VCN VR. VCN VR 105 is configured to route thepacket to Subnet-2 using port 10.1.0.1. The packet is then received andprocessed by the VNIC associated with D1 and the VNIC forwards thepacket to compute instance D1.

For a packet to be communicated from a compute instance in VCN 104 to anendpoint that is outside VCN 104, the communication is facilitated bythe VNIC associated with the source compute instance, VCN VR 105, andgateways associated with VCN 104. One or more types of gateways may beassociated with VCN 104. A gateway is an interface between a VCN andanother endpoint, where the another endpoint is outside the VCN. Agateway is a Layer-3/IP layer concept and enables a VCN to communicatewith endpoints outside the VCN. A gateway thus facilitates traffic flowbetween a VCN and other VCNs or networks. Various different types ofgateways may be configured for a VCN to facilitate different types ofcommunications with different types of endpoints. Depending upon thegateway, the communications may be over public networks (e.g., theInternet) or over private networks. Various communication protocols maybe used for these communications.

For example, compute instance C1 may want to communicate with anendpoint outside VCN 104. The packet may be first processed by the VNICassociated with source compute instance C1. The VNIC processingdetermines that the destination for the packet is outside the Subnet-1of C1. The VNIC associated with C1 may forward the packet to VCN VR 105for VCN 104. VCN VR 105 then processes the packet and as part of theprocessing, based upon the destination for the packet, determines aparticular gateway associated with VCN 104 as the next hop for thepacket. VCN VR 105 may then forward the packet to the particularidentified gateway. For example, if the destination is an endpointwithin the customer's on-premise network, then the packet may beforwarded by VCN VR 105 to Dynamic Routing Gateway (DRG) gateway 122configured for VCN 104. The packet may then be forwarded from thegateway to a next hop to facilitate communication of the packet to itfinal intended destination.

Various different types of gateways may be configured for a VCN.Examples of gateways that may be configured for a VCN are depicted inFIG. 1 and described below. Examples of gateways associated with a VCNare also depicted in FIGS. 24, 25, 26, and 27 (for example, gatewaysreferenced by reference numbers 2434, 2436, 2438, 2534, 2536, 2538,2634, 2636, 2638, 2734, 2736, and 2738) and described below. As shown inthe embodiment depicted in FIG. 1 , a Dynamic Routing Gateway (DRG) 122may be added to or be associated with customer VCN 104 and provides apath for private network traffic communication between customer VCN 104and another endpoint, where the another endpoint can be the customer'son-premise network 116, a VCN 108 in a different region of CSPI 101, orother remote cloud networks 118 not hosted by CSPI 101. Customeron-premise network 116 may be a customer network or a customer datacenter built using the customer's resources. Access to customeron-premise network 116 is generally very restricted. For a customer thathas both a customer on-premise network 116 and one or more VCNs 104deployed or hosted in the cloud by CSPI 101, the customer may want theiron-premise network 116 and their cloud-based VCN 104 to be able tocommunicate with each other. This enables a customer to build anextended hybrid environment encompassing the customer's VCN 104 hostedby CSPI 101 and their on-premises network 116. DRG 122 enables thiscommunication. To enable such communications, a communication channel124 is set up where one endpoint of the channel is in customeron-premise network 116 and the other endpoint is in CSPI 101 andconnected to customer VCN 104. Communication channel 124 can be overpublic communication networks such as the Internet or privatecommunication networks. Various different communication protocols may beused such as IPsec VPN technology over a public communication networksuch as the Internet, Oracle's FastConnect technology that uses aprivate network instead of a public network, and others. The device orequipment in customer on-premise network 116 that forms one end pointfor communication channel 124 is referred to as the customer premiseequipment (CPE), such as CPE 126 depicted in FIG. 1 . On the CSPI 101side, the endpoint may be a host machine executing DRG 122.

In certain embodiments, a Remote Peering Connection (RPC) can be addedto a DRG, which allows a customer to peer one VCN with another VCN in adifferent region. Using such an RPC, customer VCN 104 can use DRG 122 toconnect with a VCN 108 in another region. DRG 122 may also be used tocommunicate with other remote cloud networks 118, not hosted by CSPI 101such as a Microsoft Azure cloud, Amazon AWS cloud, and others.

As shown in FIG. 1 , an Internet Gateway (IGW) 120 may be configured forcustomer VCN 104 the enables a compute instance on VCN 104 tocommunicate with public endpoints 114 accessible over a public networksuch as the Internet. IGW 120 is a gateway that connects a VCN to apublic network such as the Internet. IGW 120 enables a public subnet(where the resources in the public subnet have public overlay IPaddresses) within a VCN, such as VCN 104, direct access to publicendpoints 112 on a public network 114 such as the Internet. Using IGW120, connections can be initiated from a subnet within VCN 104 or fromthe Internet.

A Network Address Translation (NAT) gateway 128 can be configured forcustomer's VCN 104 and enables cloud resources in the customer's VCN,which do not have dedicated public overlay IP addresses, access to theInternet and it does so without exposing those resources to directincoming Internet connections (e.g., L4-L7 connections). This enables aprivate subnet within a VCN, such as private Subnet-1 in VCN 104, withprivate access to public endpoints on the Internet. In NAT gateways,connections can be initiated only from the private subnet to the publicInternet and not from the Internet to the private subnet.

In certain embodiments, a Service Gateway (SGW) 126 can be configuredfor customer VCN 104 and provides a path for private network trafficbetween VCN 104 and supported services endpoints in a service network110. In certain embodiments, service network 110 may be provided by theCSP and may provide various services. An example of such a servicenetwork is Oracle's Services Network, which provides various servicesthat can be used by customers. For example, a compute instance (e.g., adatabase system) in a private subnet of customer VCN 104 can back updata to a service endpoint (e.g., Object Storage) without needing publicIP addresses or access to the Internet. In certain embodiments, a VCNcan have only one SGW, and connections can only be initiated from asubnet within the VCN and not from service network 110. If a VCN ispeered with another, resources in the other VCN typically cannot accessthe SGW. Resources in on-premises networks that are connected to a VCNwith FastConnect or VPN Connect can also use the service gatewayconfigured for that VCN.

In certain implementations, SGW 126 uses the concept of a serviceClassless Inter-Domain Routing (CIDR) label, which is a string thatrepresents all the regional public IP address ranges for the service orgroup of services of interest. The customer uses the service CIDR labelwhen they configure the SGW and related route rules to control trafficto the service. The customer can optionally utilize it when configuringsecurity rules without needing to adjust them if the service's public IPaddresses change in the future.

A Local Peering Gateway (LPG) 132 is a gateway that can be added tocustomer VCN 104 and enables VCN 104 to peer with another VCN in thesame region. Peering means that the VCNs communicate using private IPaddresses, without the traffic traversing a public network such as theInternet or without routing the traffic through the customer'son-premises network 116. In preferred embodiments, a VCN has a separateLPG for each peering it establishes. Local Peering or VCN Peering is acommon practice used to establish network connectivity between differentapplications or infrastructure management functions.

Service providers, such as providers of services in service network 110,may provide access to services using different access models. Accordingto a public access model, services may be exposed as public endpointsthat are publicly accessible by compute instance in a customer VCN via apublic network such as the Internet and or may be privately accessiblevia SGW 126. According to a specific private access model, services aremade accessible as private IP endpoints in a private subnet in thecustomer's VCN. This is referred to as a Private Endpoint (PE) accessand enables a service provider to expose their service as an instance inthe customer's private network. A Private Endpoint resource represents aservice within the customer's VCN. Each PE manifests as a VNIC (referredto as a PE-VNIC, with one or more private IPs) in a subnet chosen by thecustomer in the customer's VCN. A PE thus provides a way to present aservice within a private customer VCN subnet using a VNIC. Since theendpoint is exposed as a VNIC, all the features associates with a VNICsuch as routing rules, security lists, etc., are now available for thePE VNIC.

A service provider can register their service to enable access through aPE. The provider can associate policies with the service that restrictsthe service's visibility to the customer tenancies. A provider canregister multiple services under a single virtual IP address (VIP),especially for multi-tenant services. There may be multiple such privateendpoints (in multiple VCNs) that represent the same service.

Compute instances in the private subnet can then use the PE VNIC'sprivate IP address or the service DNS name to access the service.Compute instances in the customer VCN can access the service by sendingtraffic to the private IP address of the PE in the customer VCN. APrivate Access Gateway (PAGW) 130 is a gateway resource that can beattached to a service provider VCN (e.g., a VCN in service network 110)that acts as an ingress/egress point for all traffic from/to customersubnet private endpoints. PAGW 130 enables a provider to scale thenumber of PE connections without utilizing its internal IP addressresources. A provider needs only configure one PAGW for any number ofservices registered in a single VCN. Providers can represent a serviceas a private endpoint in multiple VCNs of one or more customers. Fromthe customer's perspective, the PE VNIC, which, instead of beingattached to a customer's instance, appears attached to the service withwhich the customer wishes to interact. The traffic destined to theprivate endpoint is routed via PAGW 130 to the service. These arereferred to as customer-to-service private connections (C2Sconnections).

The PE concept can also be used to extend the private access for theservice to customer's on-premises networks and data centers, by allowingthe traffic to flow through FastConnect/IPsec links and the privateendpoint in the customer VCN. Private access for the service can also beextended to the customer's peered VCNs, by allowing the traffic to flowbetween LPG 132 and the PE in the customer's VCN.

A customer can control routing in a VCN at the subnet level, so thecustomer can specify which subnets in the customer's VCN, such as VCN104, use each gateway. A VCN's route tables are used to decide iftraffic is allowed out of a VCN through a particular gateway. Forexample, in a particular instance, a route table for a public subnetwithin customer VCN 104 may send non-local traffic through IGW 120. Theroute table for a private subnet within the same customer VCN 104 maysend traffic destined for CSP services through SGW 126. All remainingtraffic may be sent via the NAT gateway 128. Route tables only controltraffic going out of a VCN.

Security lists associated with a VCN are used to control traffic thatcomes into a VCN via a gateway via inbound connections. All resources ina subnet use the same route table and security lists. Security lists maybe used to control specific types of traffic allowed in and out ofinstances in a subnet of a VCN. Security list rules may comprise ingress(inbound) and egress (outbound) rules. For example, an ingress rule mayspecify an allowed source address range, while an egress rule mayspecify an allowed destination address range. Security rules may specifya particular protocol (e.g., TCP, ICMP), a particular port (e.g., 22 forSSH, 3389 for Windows RDP), etc. In certain implementations, aninstance's operating system may enforce its own firewall rules that arealigned with the security list rules. Rules may be stateful (e.g., aconnection is tracked and the response is automatically allowed withoutan explicit security list rule for the response traffic) or stateless.

Access from a customer VCN (i.e., by a resource or compute instancedeployed on VCN 104) can be categorized as public access, privateaccess, or dedicated access. Public access refers to an access modelwhere a public IP address or a NAT is used to access a public endpoint.Private access enables customer workloads in VCN 104 with private IPaddresses (e.g., resources in a private subnet) to access serviceswithout traversing a public network such as the Internet. In certainembodiments, CSPI 101 enables customer VCN workloads with private IPaddresses to access the (public service endpoints of) services using aservice gateway. A service gateway thus offers a private access model byestablishing a virtual link between the customer's VCN and the service'spublic endpoint residing outside the customer's private network.

Additionally, CSPI may offer dedicated public access using technologiessuch as FastConnect public peering where customer on-premises instancescan access one or more services in a customer VCN using a FastConnectconnection and without traversing a public network such as the Internet.CSPI also may also offer dedicated private access using FastConnectprivate peering where customer on-premises instances with private IPaddresses can access the customer's VCN workloads using a FastConnectconnection. FastConnect is a network connectivity alternative to usingthe public Internet to connect a customer's on-premise network to CSPIand its services. FastConnect provides an easy, elastic, and economicalway to create a dedicated and private connection with higher bandwidthoptions and a more reliable and consistent networking experience whencompared to Internet-based connections.

FIG. 1 and the accompanying description above describes variousvirtualized components in an example virtual network. As describedabove, the virtual network is built on the underlying physical orsubstrate network. FIG. 2 depicts a simplified architectural diagram ofthe physical components in the physical network within CSPI 200 thatprovide the underlay for the virtual network according to certainembodiments. As shown, CSPI 200 provides a distributed environmentcomprising components and resources (e.g., compute, memory, andnetworking resources) provided by a cloud service provider (CSP). Thesecomponents and resources are used to provide cloud services (e.g., IaaSservices) to subscribing customers, i.e., customers that have subscribedto one or more services provided by the CSP. Based upon the servicessubscribed to by a customer, a subset of resources (e.g., compute,memory, and networking resources) of CSPI 200 are provisioned for thecustomer. Customers can then build their own cloud-based (i.e.,CSPI-hosted) customizable and private virtual networks using physicalcompute, memory, and networking resources provided by CSPI 200. Aspreviously indicated, these customer networks are referred to as virtualcloud networks (VCNs). A customer can deploy one or more customerresources, such as compute instances, on these customer VCNs. Computeinstances can be in the form of virtual machines, bare metal instances,and the like. CSPI 200 provides infrastructure and a set ofcomplementary cloud services that enable customers to build and run awide range of applications and services in a highly available hostedenvironment.

In the example embodiment depicted in FIG. 2 , the physical componentsof CSPI 200 include one or more physical host machines or physicalservers (e.g., 202, 206, 208), network virtualization devices (NVDs)(e.g., 210, 212), top-of-rack (TOR) switches (e.g., 214, 216), and aphysical network (e.g., 218), and switches in physical network 218. Thephysical host machines or servers may host and execute various computeinstances that participate in one or more subnets of a VCN. The computeinstances may include virtual machine instances, and bare metalinstances. For example, the various compute instances depicted in FIG. 1may be hosted by the physical host machines depicted in FIG. 2 . Thevirtual machine compute instances in a VCN may be executed by one hostmachine or by multiple different host machines. The physical hostmachines may also host virtual host machines, container-based hosts orfunctions, and the like. The VNICs and VCN VR depicted in FIG. 1 may beexecuted by the NVDs depicted in FIG. 2 . The gateways depicted in FIG.1 may be executed by the host machines and/or by the NVDs depicted inFIG. 2 .

The host machines or servers may execute a hypervisor (also referred toas a virtual machine monitor or VMM) that creates and enables avirtualized environment on the host machines. The virtualization orvirtualized environment facilitates cloud-based computing. One or morecompute instances may be created, executed, and managed on a hostmachine by a hypervisor on that host machine. The hypervisor on a hostmachine enables the physical computing resources of the host machine(e.g., compute, memory, and networking resources) to be shared betweenthe various compute instances executed by the host machine.

For example, as depicted in FIG. 2 , host machines 202 and 208 executehypervisors 260 and 266, respectively. These hypervisors may beimplemented using software, firmware, or hardware, or combinationsthereof. Typically, a hypervisor is a process or a software layer thatsits on top of the host machine's operating system (OS), which in turnexecutes on the hardware processors of the host machine. The hypervisorprovides a virtualized environment by enabling the physical computingresources (e.g., processing resources such as processors/cores, memoryresources, networking resources) of the host machine to be shared amongthe various virtual machine compute instances executed by the hostmachine. For example, in FIG. 2 , hypervisor 260 may sit on top of theOS of host machine 202 and enables the computing resources (e.g.,processing, memory, and networking resources) of host machine 202 to beshared between compute instances (e.g., virtual machines) executed byhost machine 202. A virtual machine can have its own operating system(referred to as a guest operating system), which may be the same as ordifferent from the OS of the host machine. The operating system of avirtual machine executed by a host machine may be the same as ordifferent from the operating system of another virtual machine executedby the same host machine. A hypervisor thus enables multiple operatingsystems to be executed alongside each other while sharing the samecomputing resources of the host machine. The host machines depicted inFIG. 2 may have the same or different types of hypervisors.

A compute instance can be a virtual machine instance or a bare metalinstance. In FIG. 2 , compute instances 268 on host machine 202 and 274on host machine 208 are examples of virtual machine instances. Hostmachine 206 is an example of a bare metal instance that is provided to acustomer.

In certain instances, an entire host machine may be provisioned to asingle customer, and all of the one or more compute instances (eithervirtual machines or bare metal instance) hosted by that host machinebelong to that same customer. In other instances, a host machine may beshared between multiple customers (i.e., multiple tenants). In such amulti-tenancy scenario, a host machine may host virtual machine computeinstances belonging to different customers. These compute instances maybe members of different VCNs of different customers. In certainembodiments, a bare metal compute instance is hosted by a bare metalserver without a hypervisor. When a bare metal compute instance isprovisioned, a single customer or tenant maintains control of thephysical CPU, memory, and network interfaces of the host machine hostingthe bare metal instance and the host machine is not shared with othercustomers or tenants.

As previously described, each compute instance that is part of a VCN isassociated with a VNIC that enables the compute instance to become amember of a subnet of the VCN. The VNIC associated with a computeinstance facilitates the communication of packets or frames to and fromthe compute instance. A VNIC is associated with a compute instance whenthe compute instance is created. In certain embodiments, for a computeinstance executed by a host machine, the VNIC associated with thatcompute instance is executed by an NVD connected to the host machine.For example, in FIG. 2 , host machine 202 executes a virtual machinecompute instance 268 that is associated with VNIC 276, and VNIC 276 isexecuted by NVD 210 connected to host machine 202. As another example,bare metal instance 272 hosted by host machine 206 is associated withVNIC 280 that is executed by NVD 212 connected to host machine 206. Asyet another example, VNIC 284 is associated with compute instance 274executed by host machine 208, and VNIC 284 is executed by NVD 212connected to host machine 208.

For compute instances hosted by a host machine, an NVD connected to thathost machine also executes VCN VRs corresponding to VCNs of which thecompute instances are members. For example, in the embodiment depictedin FIG. 2 , NVD 210 executes VCN VR 277 corresponding to the VCN ofwhich compute instance 268 is a member. NVD 212 may also execute one ormore VCN VRs 283 corresponding to VCNs corresponding to the computeinstances hosted by host machines 206 and 208.

A host machine may include one or more network interface cards (NIC)that enable the host machine to be connected to other devices. A NIC ona host machine may provide one or more ports (or interfaces) that enablethe host machine to be communicatively connected to another device. Forexample, a host machine may be connected to an NVD using one or moreports (or interfaces) provided on the host machine and on the NVD. Ahost machine may also be connected to other devices such as another hostmachine.

For example, in FIG. 2 , host machine 202 is connected to NVD 210 usinglink 220 that extends between a port 234 provided by a NIC 232 of hostmachine 202 and between a port 236 of NVD 210. Host machine 206 isconnected to NVD 212 using link 224 that extends between a port 246provided by a NIC 244 of host machine 206 and between a port 248 of NVD212. Host machine 208 is connected to NVD 212 using link 226 thatextends between a port 252 provided by a NIC 250 of host machine 208 andbetween a port 254 of NVD 212.

The NVDs are in turn connected via communication links totop-of-the-rack (TOR) switches, which are connected to physical network218 (also referred to as the switch fabric). In certain embodiments, thelinks between a host machine and an NVD, and between an NVD and a TORswitch are Ethernet links. For example, in FIG. 2 , NVDs 210 and 212 areconnected to TOR switches 214 and 216, respectively, using links 228 and230. In certain embodiments, the links 220, 224, 226, 228, and 230 areEthernet links. The collection of host machines and NVDs that areconnected to a TOR is sometimes referred to as a rack.

Physical network 218 provides a communication fabric that enables TORswitches to communicate with each other. Physical network 218 can be amulti-tiered network. In certain implementations, physical network 218is a multi-tiered Clos network of switches, with TOR switches 214 and216 representing the leaf level nodes of the multi-tiered and multi-nodephysical switching network 218. Different Clos network configurationsare possible including but not limited to a 2-tier network, a 3-tiernetwork, a 4-tier network, a 5-tier network, and in general a “n”-tierednetwork. An example of a Clos network is depicted in FIG. 5 anddescribed below.

Various different connection configurations are possible between hostmachines and NVDs such as one-to-one configuration, many-to-oneconfiguration, one-to-many configuration, and others. In a one-to-oneconfiguration implementation, each host machine is connected to its ownseparate NVD. For example, in FIG. 2 , host machine 202 is connected toNVD 210 via NIC 232 of host machine 202. In a many-to-one configuration,multiple host machines are connected to one NVD. For example, in FIG. 2, host machines 206 and 208 are connected to the same NVD 212 via NICs244 and 250, respectively.

In a one-to-many configuration, one host machine is connected tomultiple NVDs. FIG. 3 shows an example within CSPI 300 where a hostmachine is connected to multiple NVDs. As shown in FIG. 3 , host machine302 comprises a network interface card (NIC) 304 that includes multipleports 306 and 308. Host machine 300 is connected to a first NVD 310 viaport 306 and link 320, and connected to a second NVD 312 via port 308and link 322. Ports 306 and 308 may be Ethernet ports and the links 320and 322 between host machine 302 and NVDs 310 and 312 may be Ethernetlinks. NVD 310 is in turn connected to a first TOR switch 314 and NVD312 is connected to a second TOR switch 316. The links between NVDs 310and 312, and TOR switches 314 and 316 may be Ethernet links. TORswitches 314 and 316 represent the Tier-0 switching devices inmulti-tiered physical network 318.

The arrangement depicted in FIG. 3 provides two separate physicalnetwork paths to and from physical switch network 318 to host machine302: a first path traversing TOR switch 314 to NVD 310 to host machine302, and a second path traversing TOR switch 316 to NVD 312 to hostmachine 302. The separate paths provide for enhanced availability(referred to as high availability) of host machine 302. If there areproblems in one of the paths (e.g., a link in one of the paths goesdown) or devices (e.g., a particular NVD is not functioning), then theother path may be used for communications to/from host machine 302.

In the configuration depicted in FIG. 3 , the host machine is connectedto two different NVDs using two different ports provided by a NIC of thehost machine. In other embodiments, a host machine may include multipleNICs that enable connectivity of the host machine to multiple NVDs.

Referring back to FIG. 2 , an NVD is a physical device or component thatperforms one or more network and/or storage virtualization functions. AnNVD may be any device with one or more processing units (e.g., CPUs,Network Processing Units (NPUs), FPGAs, packet processing pipelines,etc.), memory including cache, and ports. The various virtualizationfunctions may be performed by software/firmware executed by the one ormore processing units of the NVD.

An NVD may be implemented in various different forms. For example, incertain embodiments, an NVD is implemented as an interface card referredto as a smartNIC or an intelligent NIC with an embedded processoronboard. A smartNIC is a separate device from the NICs on the hostmachines. In FIG. 2 , the NVDs 210 and 212 may be implemented assmartNICs that are connected to host machines 202, and host machines 206and 208, respectively.

A smartNIC is however just one example of an NVD implementation. Variousother implementations are possible. For example, in some otherimplementations, an NVD or one or more functions performed by the NVDmay be incorporated into or performed by one or more host machines, oneor more TOR switches, and other components of CSPI 200. For example, anNVD may be embodied in a host machine where the functions performed byan NVD are performed by the host machine. As another example, an NVD maybe part of a TOR switch or a TOR switch may be configured to performfunctions performed by an NVD that enables the TOR switch to performvarious complex packet transformations that are used for a public cloud.A TOR that performs the functions of an NVD is sometimes referred to asa smart TOR. In yet other implementations, where virtual machines (VMs)instances, but not bare metal (BM) instances, are offered to customers,functions performed by an NVD may be implemented inside a hypervisor ofthe host machine. In some other implementations, some of the functionsof the NVD may be offloaded to a centralized service running on a fleetof host machines.

In certain embodiments, such as when implemented as a smartNIC as shownin FIG. 2 , an NVD may comprise multiple physical ports that enable itto be connected to one or more host machines and to one or more TORswitches. A port on an NVD can be classified as a host-facing port (alsoreferred to as a “south port”) or a network-facing or TOR-facing port(also referred to as a “north port”). A host-facing port of an NVD is aport that is used to connect the NVD to a host machine. Examples ofhost-facing ports in FIG. 2 include port 236 on NVD 210, and ports 248and 254 on NVD 212. A network-facing port of an NVD is a port that isused to connect the NVD to a TOR switch. Examples of network-facingports in FIG. 2 include port 256 on NVD 210, and port 258 on NVD 212. Asshown in FIG. 2 , NVD 210 is connected to TOR switch 214 using link 228that extends from port 256 of NVD 210 to the TOR switch 214. Likewise,NVD 212 is connected to TOR switch 216 using link 230 that extends fromport 258 of NVD 212 to the TOR switch 216.

An NVD receives packets and frames from a host machine (e.g., packetsand frames generated by a compute instance hosted by the host machine)via a host-facing port and, after performing the necessary packetprocessing, may forward the packets and frames to a TOR switch via anetwork-facing port of the NVD. An NVD may receive packets and framesfrom a TOR switch via a network-facing port of the NVD and, afterperforming the necessary packet processing, may forward the packets andframes to a host machine via a host-facing port of the NVD.

In certain embodiments, there may be multiple ports and associated linksbetween an NVD and a TOR switch. These ports and links may be aggregatedto form a link aggregator group of multiple ports or links (referred toas a LAG). Link aggregation allows multiple physical links between twoend-points (e.g., between an NVD and a TOR switch) to be treated as asingle logical link. All the physical links in a given LAG may operatein full-duplex mode at the same speed. LAGs help increase the bandwidthand reliability of the connection between two endpoints. If one of thephysical links in the LAG goes down, traffic is dynamically andtransparently reassigned to one of the other physical links in the LAG.The aggregated physical links deliver higher bandwidth than eachindividual link. The multiple ports associated with a LAG are treated asa single logical port. Traffic can be load-balanced across the multiplephysical links of a LAG. One or more LAGs may be configured between twoendpoints. The two endpoints may be between an NVD and a TOR switch,between a host machine and an NVD, and the like.

An NVD implements or performs network virtualization functions. Thesefunctions are performed by software/firmware executed by the NVD.Examples of network virtualization functions include without limitation:packet encapsulation and de-capsulation functions; functions forcreating a VCN network; functions for implementing network policies suchas VCN security list (firewall) functionality; functions that facilitatethe routing and forwarding of packets to and from compute instances in aVCN; and the like. In certain embodiments, upon receiving a packet, anNVD is configured to execute a packet processing pipeline for processingthe packet and determining how the packet is to be forwarded or routed.As part of this packet processing pipeline, the NVD may execute one ormore virtual functions associated with the overlay network such asexecuting VNICs associated with compute instances in the VCN, executinga Virtual Router (VR) associated with the VCN, the encapsulation anddecapsulation of packets to facilitate forwarding or routing in thevirtual network, execution of certain gateways (e.g., the Local PeeringGateway), the implementation of Security Lists, Network Security Groups,network address translation (NAT) functionality (e.g., the translationof Public IP to Private IP on a host by host basis), throttlingfunctions, and other functions.

In certain embodiments, the packet processing data path in an NVD maycomprise multiple packet pipelines, each composed of a series of packettransformation stages. In certain implementations, upon receiving apacket, the packet is parsed and classified to a single pipeline. Thepacket is then processed in a linear fashion, one stage after another,until the packet is either dropped or sent out over an interface of theNVD. These stages provide basic functional packet processing buildingblocks (e.g., validating headers, enforcing throttle, inserting newLayer-2 headers, enforcing L4 firewall, VCN encapsulation/decapsulation,etc.) so that new pipelines can be constructed by composing existingstages, and new functionality can be added by creating new stages andinserting them into existing pipelines.

An NVD may perform both control plane and data plane functionscorresponding to a control plane and a data plane of a VCN. Examples ofa VCN Control Plane are also depicted in FIGS. 24, 25, 26, and 27 (seereferences 2416, 2516, 2616, and 2716) and described below. Examples ofa VCN Data Plane are depicted in FIGS. 24, 25, 26, and 27 (seereferences 2418, 2518, 2618, and 2718) and described below. The controlplane functions include functions used for configuring a network (e.g.,setting up routes and route tables, configuring VNICs, etc.) thatcontrols how data is to be forwarded. In certain embodiments, a VCNControl Plane is provided that computes all the overlay-to-substratemappings centrally and publishes them to the NVDs and to the virtualnetwork edge devices such as various gateways such as the DRG, the SGW,the IGW, etc. Firewall rules may also be published using the samemechanism. In certain embodiments, an NVD only gets the mappings thatare relevant for that NVD. The data plane functions include functionsfor the actual routing/forwarding of a packet based upon configurationset up using control plane. A VCN data plane is implemented byencapsulating the customer's network packets before they traverse thesubstrate network. The encapsulation/decapsulation functionality isimplemented on the NVDs. In certain embodiments, an NVD is configured tointercept all network packets in and out of host machines and performnetwork virtualization functions.

As indicated above, an NVD executes various virtualization functionsincluding VNICs and VCN VRs. An NVD may execute VNICs associated withthe compute instances hosted by one or more host machines connected tothe VNIC. For example, as depicted in FIG. 2 , NVD 210 executes thefunctionality for VNIC 276 that is associated with compute instance 268hosted by host machine 202 connected to NVD 210. As another example, NVD212 executes VNIC 280 that is associated with bare metal computeinstance 272 hosted by host machine 206, and executes VNIC 284 that isassociated with compute instance 274 hosted by host machine 208. A hostmachine may host compute instances belonging to different VCNs, whichbelong to different customers, and the NVD connected to the host machinemay execute the VNICs (i.e., execute VNICs-relate functionality)corresponding to the compute instances.

An NVD also executes VCN Virtual Routers corresponding to the VCNs ofthe compute instances. For example, in the embodiment depicted in FIG. 2, NVD 210 executes VCN VR 277 corresponding to the VCN to which computeinstance 268 belongs. NVD 212 executes one or more VCN VRs 283corresponding to one or more VCNs to which compute instances hosted byhost machines 206 and 208 belong. In certain embodiments, the VCN VRcorresponding to that VCN is executed by all the NVDs connected to hostmachines that host at least one compute instance belonging to that VCN.If a host machine hosts compute instances belonging to different VCNs,an NVD connected to that host machine may execute VCN VRs correspondingto those different VCNs.

In addition to VNICs and VCN VRs, an NVD may execute various software(e.g., daemons) and include one or more hardware components thatfacilitate the various network virtualization functions performed by theNVD. For purposes of simplicity, these various components are groupedtogether as “packet processing components” shown in FIG. 2 . Forexample, NVD 210 comprises packet processing components 286 and NVD 212comprises packet processing components 288. For example, the packetprocessing components for an NVD may include a packet processor that isconfigured to interact with the NVD's ports and hardware interfaces tomonitor all packets received by and communicated using the NVD and storenetwork information. The network information may, for example, includenetwork flow information identifying different network flows handled bythe NVD and per flow information (e.g., per flow statistics). In certainembodiments, network flows information may be stored on a per VNICbasis. The packet processor may perform packet-by-packet manipulationsas well as implement stateful NAT and L4 firewall (FW). As anotherexample, the packet processing components may include a replicationagent that is configured to replicate information stored by the NVD toone or more different replication target stores. As yet another example,the packet processing components may include a logging agent that isconfigured to perform logging functions for the NVD. The packetprocessing components may also include software for monitoring theperformance and health of the NVD and, also possibly of monitoring thestate and health of other components connected to the NVD.

FIG. 1 shows the components of an example virtual or overlay networkincluding a VCN, subnets within the VCN, compute instances deployed onsubnets, VNICs associated with the compute instances, a VR for a VCN,and a set of gateways configured for the VCN. The overlay componentsdepicted in FIG. 1 may be executed or hosted by one or more of thephysical components depicted in FIG. 2 . For example, the computeinstances in a VCN may be executed or hosted by one or more hostmachines depicted in FIG. 2 . For a compute instance hosted by a hostmachine, the VNIC associated with that compute instance is typicallyexecuted by an NVD connected to that host machine (i.e., the VNICfunctionality is provided by the NVD connected to that host machine).The VCN VR function for a VCN is executed by all the NVDs that areconnected to host machines hosting or executing the compute instancesthat are part of that VCN. The gateways associated with a VCN may beexecuted by one or more different types of NVDs. For example, certaingateways may be executed by smartNICs, while others may be executed byone or more host machines or other implementations of NVDs.

As described above, a compute instance in a customer VCN may communicatewith various different endpoints, where the endpoints can be within thesame subnet as the source compute instance, in a different subnet butwithin the same VCN as the source compute instance, or with an endpointthat is outside the VCN of the source compute instance. Thesecommunications are facilitated using VNICs associated with the computeinstances, the VCN VRs, and the gateways associated with the VCNs.

For communications between two compute instances on the same subnet in aVCN, the communication is facilitated using VNICs associated with thesource and destination compute instances. The source and destinationcompute instances may be hosted by the same host machine or by differenthost machines. A packet originating from a source compute instance maybe forwarded from a host machine hosting the source compute instance toan NVD connected to that host machine. On the NVD, the packet isprocessed using a packet processing pipeline, which can includeexecution of the VNIC associated with the source compute instance. Sincethe destination endpoint for the packet is within the same subnet,execution of the VNIC associated with the source compute instanceresults in the packet being forwarded to an NVD executing the VNICassociated with the destination compute instance, which then processesand forwards the packet to the destination compute instance. The VNICsassociated with the source and destination compute instances may beexecuted on the same NVD (e.g., when both the source and destinationcompute instances are hosted by the same host machine) or on differentNVDs (e.g., when the source and destination compute instances are hostedby different host machines connected to different NVDs). The VNICs mayuse routing/forwarding tables stored by the NVD to determine the nexthop for the packet.

For a packet to be communicated from a compute instance in a subnet toan endpoint in a different subnet in the same VCN, the packetoriginating from the source compute instance is communicated from thehost machine hosting the source compute instance to the NVD connected tothat host machine. On the NVD, the packet is processed using a packetprocessing pipeline, which can include execution of one or more VNICs,and the VR associated with the VCN. For example, as part of the packetprocessing pipeline, the NVD executes or invokes functionalitycorresponding to the VNIC (also referred to as executes the VNIC)associated with source compute instance. The functionality performed bythe VNIC may include looking at the VLAN identifier on the packet. Sincethe packet's destination is outside the subnet, the VCN VR functionalityis next invoked and executed by the NVD. The VCN VR then routes thepacket to the NVD executing the VNIC associated with the destinationcompute instance. The VNIC associated with the destination computeinstance then processes the packet and forwards the packet to thedestination compute instance. The VNICs associated with the source anddestination compute instances may be executed on the same NVD (e.g.,when both the source and destination compute instances are hosted by thesame host machine) or on different NVDs (e.g., when the source anddestination compute instances are hosted by different host machinesconnected to different NVDs).

If the destination for the packet is outside the VCN of the sourcecompute instance, then the packet originating from the source computeinstance is communicated from the host machine hosting the sourcecompute instance to the NVD connected to that host machine. The NVDexecutes the VNIC associated with the source compute instance. Since thedestination end point of the packet is outside the VCN, the packet isthen processed by the VCN VR for that VCN. The NVD invokes the VCN VRfunctionality, which may result in the packet being forwarded to an NVDexecuting the appropriate gateway associated with the VCN. For example,if the destination is an endpoint within the customer's on-premisenetwork, then the packet may be forwarded by the VCN VR to the NVDexecuting the DRG gateway configured for the VCN. The VCN VR may beexecuted on the same NVD as the NVD executing the VNIC associated withthe source compute instance or by a different NVD. The gateway may beexecuted by an NVD, which may be a smartNIC, a host machine, or otherNVD implementation. The packet is then processed by the gateway andforwarded to a next hop that facilitates communication of the packet toits intended destination endpoint. For example, in the embodimentdepicted in FIG. 2 , a packet originating from compute instance 268 maybe communicated from host machine 202 to NVD 210 over link 220 (usingNIC 232). On NVD 210, VNIC 276 is invoked since it is the VNICassociated with source compute instance 268. VNIC 276 is configured toexamine the encapsulated information in the packet, and determine a nexthop for forwarding the packet with the goal of facilitatingcommunication of the packet to its intended destination endpoint, andthen forward the packet to the determined next hop.

A compute instance deployed on a VCN can communicate with variousdifferent endpoints. These endpoints may include endpoints that arehosted by CSPI 200 and endpoints outside CSPI 200. Endpoints hosted byCSPI 200 may include instances in the same VCN or other VCNs, which maybe the customer's VCNs, or VCNs not belonging to the customer.Communications between endpoints hosted by CSPI 200 may be performedover physical network 218. A compute instance may also communicate withendpoints that are not hosted by CSPI 200, or are outside CSPI 200.Examples of these endpoints include endpoints within a customer'son-premise network or data center, or public endpoints accessible over apublic network such as the Internet. Communications with endpointsoutside CSPI 200 may be performed over public networks (e.g., theInternet) (not shown in FIG. 2 ) or private networks (not shown in FIG.2 ) using various communication protocols.

The architecture of CSPI 200 depicted in FIG. 2 is merely an example andis not intended to be limiting. Variations, alternatives, andmodifications are possible in alternative embodiments. For example, insome implementations, CSPI 200 may have more or fewer systems orcomponents than those shown in FIG. 2 , may combine two or more systems,or may have a different configuration or arrangement of systems. Thesystems, subsystems, and other components depicted in FIG. 2 may beimplemented in software (e.g., code, instructions, program) executed byone or more processing units (e.g., processors, cores) of the respectivesystems, using hardware, or combinations thereof. The software may bestored on a non-transitory storage medium (e.g., on a memory device).

FIG. 4 depicts connectivity between a host machine and an NVD forproviding I/O virtualization for supporting multitenancy according tocertain embodiments. As depicted in FIG. 4 , host machine 402 executes ahypervisor 404 that provides a virtualized environment. Host machine 402executes two virtual machine instances, VM1 406 belonging tocustomer/tenant #1 and VM2 408 belonging to customer/tenant #2. Hostmachine 402 comprises a physical NIC 410 that is connected to an NVD 412via link 414. Each of the compute instances is attached to a VNIC thatis executed by NVD 412. In the embodiment in FIG. 4 , VM1 406 isattached to VNIC-VM1 420 and VM2 408 is attached to VNIC-VM2 422.

As shown in FIG. 4 , NIC 410 comprises two logical NICs, logical NIC A416 and logical NIC B 418. Each virtual machine is attached to andconfigured to work with its own logical NIC. For example, VM1 406 isattached to logical NIC A 416 and VM2 408 is attached to logical NIC B418. Even though host machine 402 comprises only one physical NIC 410that is shared by the multiple tenants, due to the logical NICs, eachtenant's virtual machine believes they have their own host machine andNIC.

In certain embodiments, each logical NIC is assigned its own VLAN ID.Thus, a specific VLAN ID is assigned to logical NIC A 416 for Tenant #1and a separate VLAN ID is assigned to logical NIC B 418 for Tenant #2.When a packet is communicated from VM1 406, a tag assigned to Tennant #1is attached to the packet by the hypervisor and the packet is thencommunicated from host machine 402 to NVD 412 over link 414. In asimilar manner, when a packet is communicated from VM2 408, a tagassigned to Tenant #2 is attached to the packet by the hypervisor andthe packet is then communicated from host machine 402 to NVD 412 overlink 414. Accordingly, a packet 424 communicated from host machine 402to NVD 412 has an associated tag 426 that identifies a specific tenantand associated VM. On the NVD, for a packet 424 received from hostmachine 402, the tag 426 associated with the packet is used to determinewhether the packet is to be processed by VNIC-VM1 420 or by VNIC-VM2422. The packet is then processed by the corresponding VNIC. Theconfiguration depicted in FIG. 4 enables each tenant's compute instanceto believe that they own their own host machine and NIC. The setupdepicted in FIG. 4 provides for I/O virtualization for supportingmulti-tenancy.

FIG. 5 depicts a simplified block diagram of a physical network 500according to certain embodiments. The embodiment depicted in FIG. 5 isstructured as a Clos network. A Clos network is a particular type ofnetwork topology designed to provide connection redundancy whilemaintaining high bisection bandwidth and maximum resource utilization. AClos network is a type of non-blocking, multistage or multi-tieredswitching network, where the number of stages or tiers can be two,three, four, five, etc. The embodiment depicted in FIG. 5 is a 3-tierednetwork comprising tiers 1, 2, and 3. The TOR switches 504 representTier-0 switches in the Clos network. One or more NVDs are connected tothe TOR switches. Tier-0 switches are also referred to as edge devicesof the physical network. The Tier-0 switches are connected to Tier-1switches, which are also referred to as leaf switches. In the embodimentdepicted in FIG. 5 , a set of “n” Tier-0 TOR switches are connected to aset of “n” Tier-1 switches and together form a pod. Each Tier-0 switchin a pod is interconnected to all the Tier-1 switches in the pod, butthere is no connectivity of switches between pods. In certainimplementations, two pods are referred to as a block. Each block isserved by or connected to a set of “n” Tier-2 switches (sometimesreferred to as spine switches). There can be several blocks in thephysical network topology. The Tier-2 switches are in turn connected to“n” Tier-3 switches (sometimes referred to as super-spine switches).Communication of packets over physical network 500 is typicallyperformed using one or more Layer-3 communication protocols. Typically,all the layers of the physical network, except for the TORs layer aren-ways redundant thus allowing for high availability. Policies may bespecified for pods and blocks to control the visibility of switches toeach other in the physical network so as to enable scaling of thephysical network.

A feature of a Clos network is that the maximum hop count to reach fromone Tier-0 switch to another Tier-0 switch (or from an NVD connected toa Tier-0-switch to another NVD connected to a Tier-0 switch) is fixed.For example, in a 3-Tiered Clos network at most seven hops are neededfor a packet to reach from one NVD to another NVD, where the source andtarget NVDs are connected to the leaf tier of the Clos network.Likewise, in a 4-tiered Clos network, at most nine hops are needed for apacket to reach from one NVD to another NVD, where the source and targetNVDs are connected to the leaf tier of the Clos network. Thus, a Closnetwork architecture maintains consistent latency throughout thenetwork, which is important for communication within and between datacenters. A Clos topology scales horizontally and is cost effective. Thebandwidth/throughput capacity of the network can be easily increased byadding more switches at the various tiers (e.g., more leaf and spineswitches) and by increasing the number of links between the switches atadjacent tiers.

In certain embodiments, each resource within CSPI is assigned a uniqueidentifier called a Cloud Identifier (CID). This identifier is includedas part of the resource's information and can be used to manage theresource, for example, via a Console or through APIs. An example syntaxfor a CID is:ocid1.<RESOURCE TYPE>.<REALM>.[REGION][.FUTURE USE].<UNIQUE ID>where,

-   -   ocid1: The literal string indicating the version of the CID;    -   resource type: The type of resource (for example, instance,        volume, VCN, subnet, user, group, and so on);    -   realm: The realm the resource is in. Example values are “c1” for        the commercial realm, “c2” for the Government Cloud realm, or        “c3” for the Federal Government Cloud realm, etc. Each realm may        have its own domain name;    -   region: The region the resource is in. If the region is not        applicable to the resource, this part might be blank;    -   future use: Reserved for future use.    -   unique ID: The unique portion of the ID. The format may vary        depending on the type of resource or service.        L2 Virtual Network

The number of enterprise customers transitioning their on-premiseapplications to a cloud environment provided by a cloud servicesprovider (CSP) continues to increase rapidly. However, many of thesecustomers are quickly realizing that the road to transitioning to acloud environment can be quite bumpy requiring the customers torearchitect and reengineer their existing applications to make themworkable in the cloud environment. This is because applications writtenfor an on-premise environment often depend on features of the physicalnetwork for monitoring, availability, and scale. These on-premiseapplications thus need to be rearchitected and reengineered before theycan work in a cloud environment.

There are several reasons why on-premise applications cannot easilytransition to the cloud environment. One of the main reasons is thatcurrent cloud virtual networks operate at the Layer-3 of the OSI model,for example at the IP layer, and do not provide Layer-2 capabilities,which are needed by the application. Layer-3-based routing or forwardingincludes determining where a packet is to be sent (e.g., to whichcustomer instance) based upon information contained in the Layer-3header of the packet, for example, based upon the destination IP addresscontained in the Layer-3 header of the packet. To facilitate this, thelocation of IP addresses in the virtualized cloud network are determinedthrough a centralized control and orchestration system or controller.These may include, for example, IP addresses associated with customerentities or resources in the virtualized cloud environment.

Many customers run applications in their on-premise environments thathave strict requirements for Layer-2 networking capabilities whichcurrently are not addressed by current cloud offerings and IaaS serviceproviders. For example, traffic is current cloud offerings is routedusing Layer-3 protocols that use Layer-3 headers, and Layer-2 featuresneeded by the applications are not supported. These Layer-2 features mayinclude features such as Address Resolution Protocol (ARP) processing,Medium Access Controls (MAC) address learning, and Layer-2 broadcastcapabilities, Layer-2 (MAC based) forwarding, Layer-2 networkingconstructs, and others. By providing virtualized Layer-2 networkingfunctionality in the virtualized cloud network, as described in thisdisclosure, customers can now migrate their legacy applicationsseamlessly to the cloud environment without requiring any substantialrearchitecting or reengineering. For example, the virtualized Layer-2networking capabilities described herein enable such applications (e.g.,VMware vSphere, vCenter, vSAN and NSX-T components) to communicate atLayer-2 as they do in the on-premise environment. These applications areable to run the same versions and configurations in the public cloud,thereby enabling customers to use their legacy on-premise applicationsincluding existing knowledge, tools, and processes associated with thelegacy applications. Customers are also be able to access native cloudservices from their applications (e.g., using VMware Software DefinedData Center (SDDC)).

As another example, there are several legacy on-premise applications(e.g., enterprise clustering software applications, network virtualappliances) that require Layer-2 broadcast support for failover. Exampleapplications include Fortinet FortiGate, IBM QRadar, Palo Altofirewalls, Cisco ASA, Juniper SRX, and Oracle RAC (Real ApplicationClustering). By providing virtualized Layer-2 networking in thevirtualized public cloud as described in this disclosure, theseappliances are now able to run in a virtualized public cloud environmentunaltered. AS described herein, virtualized Layer-2 networkingfunctionality is provided that is comparable to on-premise. Thevirtualized Layer-2 networking functionality described in thisdisclosure supports traditional Layer-2 networking. This includessupport of customer-defined VLANs as well as unicast, broadcast, andmulticast Layer-2 traffic functions. Layer-2 based routing andforwarding of packets comprises using Layer-2 protocols and usinginformation contained in the Layer-2 header of a packet, for example,based upon the destination MAC address contained in the Layer-2 headerto route or forward the packet. Protocols used by enterpriseapplications (e.g., clustering software applications) such as ARP,Gratuitous Address Resolution Protocol (GARP), and Reverse AddressResolution Protocol (RARP) can also now work in the cloud environment.

There are several reasons why traditional virtualized cloudinfrastructures support virtualized Layer-3 networking and not Layer-2networking. Layer-2 networks typically do not scale as well as Layer-3networks. Layer-2 network control protocols do not have the level ofsophistication that is desired for scaling. For example, Layer-3networks do not have to worry about packet looping that Layer-2 networkshave to tackle. IP packets (i.e., Layer-3 packets) have the notion of atime to live (TTL), while Layer-2 packets do not. IP addresses,contained inside of Layer-3 packets, have a concept of topology, such assubnets, CDR ranges, etc., while Layer-2 addresses (e.g., MAC addresses)do not. Layer-3 IP networks have inbuilt tools that facilitatetroubleshooting, such as ping, traceroute, etc. for finding pathinformation. Such tools are not available for Layer-2. Layer-3 networkssupport multi-pathing, which is not available at Layer-2. Because of thelack of sophisticated control protocols (e.g. Border Gateway Protocol(BGP) and Open Shortest Path First (OSPF)) especially for exchanginginformation between entities in a network, Layer-2 networks have to relyon broadcasting and multicasting in order to learn about the network,which can adversely impact network performance. As networks change, thelearning process for Layer-2 has to be repeated, which is not needed atLayer-3. For these reasons and others, it is more desirable for cloudIaaS service providers to provide infrastructures that operate atLayer-3 rather than at Layer-2.

However, in spite of its multiple shortcomings, Layer-2 functionality isneeded by many on-premise applications. For example, assume avirtualized cloud configuration where a customer (Customer 1) has twoinstances instance A with IP1 and instance B with IP2, in a virtualnetwork “V” where an instance may be a compute instance (e.g. baremetal, virtual machine or container) or a service instance such as aload balancer, nfs mount point, or other service instance. The virtualnetwork V is a distinct address space isolated from other virtualnetworks and the underlying physical network. For example, thisisolation may be achieved using various techniques including packetencapsulation or NAT. For this reason the IP address for an instance ina customer's virtual network is distinct from an address in the physicalnetwork where it is hosted. A centralized SDN (Software DefinedNetworking) control plane is provided that knows the physical IP andvirtual interfaces of all virtual IP addresses. When a packet is sentfrom instance A to a destination of IP2 in the virtual network V, thevirtual network SDN stack needs to know where IP2 is located. It has toknow this ahead of time so that it can send the packet to the IP in thephysical network where virtual IP address IP2 for V is hosted. Thelocation of a virtual IP address can be modified in the cloud thuschanging the relationship between a physical IP and virtual IP address.Whenever a virtual IP address is to be moved (e.g., an IP addressassociated with a virtual machine is to be moved to another virtualmachine or a virtual machine is migrated to a new physical host), an APIcall has to be made to the SDN control plane letting the controller knowthat the IP is being moved so that it can update all participants in theSDN stack including packet processors (data planes). There are classesof applications however that do not make such API calls. Examplesinclude various on-premise applications, applications provided byvarious virtualization software vendors such as VMware, and others. Thevalue of facilitating a virtual Layer-2 network in a virtualized cloudenvironment enables support for such applications that are notprogrammed to make such API calls or applications that rely on otherLayer-2 networking features, such as support for non-IP Layer-3 and MAClearning.

A virtual Layer-2 network creates a broadcast domain wherein learning isperformed by members of the broadcast domain. In a virtual Layer-2domain, there can be any IP on any MAC on any host within this Layer-2domain and the system will learn using standard Layer-2 networkingprotocols and the system will virtualize these networking primitives,without having to be explicitly told by a centralized controller as towhere MACs and IPs live in that virtual Layer-2 network. This enablesapplications to be run that need low latency failover, applications thatneed to support broadcast or multicast protocols to multiple nodes, andlegacy applications that do not know how to make API calls to a SDNcontrol plane or to an API endpoint to determine where IP and MACaddresses live. Providing Layer-2 networking capabilities in thevirtualized cloud environment is thus needed to be able to supportfunctionality that is not available at the IP Layer-3 level.

Another technical advantage of providing virtual Layer-2 in avirtualized cloud environment is that it enables various differentLayer-3 protocols (such as IPV4, IPV6) to be supported, including non-IPprotocols. For example, various non-IP protocols can be supported, suchas IPX, AppleTalk, and others. Because existing cloud IaaS providers donot provide Layer-2 functionality in their virtualized cloud networks,they cannot support these non-IP protocols. By providing Layer-2networking functionality as described in this disclosure, support can beprovided for protocols at Layer-3 and for applications that need andrely on the availability of Layer-2 level functionality.

Using the techniques described in this disclosure, both Layer-3 andLayer-2 functionality is provided in the virtualized cloudinfrastructure. As previously described, Layer-3 based networkingprovides certain efficiencies, especially well-suited for scaling, thatare not provided by Layer-2 networking. Providing Layer-2 functionalityin addition to Layer-3 functionality allows such efficiencies providedby Layer-3 to be leveraged (e.g., to provide more scalable solutions)while providing Layer-2 functionality in a more scalable way. Forexample, virtualized Layer-3 avoids having to use broadcasting forlearning purposes. By offering Layer-3 for its efficiencies, and at thesame time offering a virtualized Layer-2 for enabling those applicationsthat need it and applications that are not be able to function withouthaving Layer-2 functionality, and for supporting non-IP protocols, etc.,complete flexibility in the virtualized cloud environment is offered tocustomers.

Customers themselves have hybrid environments in which Layer-2environments exist along with Layer-3 environments, and the virtualizedcloud environment can now support both these environments. A customercan have Layer-3 networks such as subnets, and/or Layer-2 networks suchas VLANs, and these two environments can talk to each other in thevirtualized cloud environment.

The virtualized cloud environment also needs to support multitenancy.Multi-tenancy makes the provisioning of both Layer-3 functionality andLayer-2 functionality in the same virtualized cloud environmenttechnically difficult and complicated. For example, the Layer-2broadcast domain must be managed across many different customers in thecloud provider's infrastructure. The embodiments describe in thisdisclosure overcome these technical issues.

For a virtualization provider (e.g. VMware), a virtualized Layer-2network that emulates a physical Layer-2 network allows workloads to berun unaltered. Applications provided by such a virtualization providercan then run on the virtualized Layer-2 network provided by the cloudinfrastructure. For example, such applications may comprise a set ofinstances that need to run on a Layer-2 network. When a customer wantsto lift and shift such an application from their on-premise environmentto a virtualized cloud environment, they cannot just take theapplication and run it in the cloud because those applications rely onan underlying Layer-2 network (e.g., the Layer-2 network features areused to perform migration of virtual machines, or to move where MAC andIP addresses live), which is not provided by current virtualized cloudproviders. For these reasons, such applications cannot run natively in avirtualized cloud environment. Using the techniques described herein, acloud provider, in addition to providing a virtualized Layer-3 network,also provides a virtualized Layer-2 network. Now, such applicationstacks can run in the cloud environment unaltered and can run a nestedvirtualization in the cloud environment. Customers can now run their ownLayer-2 applications in the cloud and manage them. Application providersdo not have to make any changes to their software to facilitate this.Such legacy applications or workloads (e.g., legacy load balancers,legacy applications, KVMs, Openstack, clustering software) can now berun in the virtualized cloud environment unaltered.

By offering virtualized Layer-2 functionality as described herein,various Layer-3 protocols, including non-IP protocols, can be now besupported by the virtualized cloud environment. Taking Ethernet as anexample, various different EtherTypes (a field in the Layer-2 headerthat tells what type of Layer-3 packet is being sent; tells whatprotocol to expect at Layer-3) can be supported, including variousnon-IP protocols. EtherType is a two-octet field in an Ethernet frame.It is used to indicate which protocol is encapsulated in the payload ofthe frame and is used at the receiving end by the data link layer todetermine how the payload is processed. The EtherType is also used asthe basis of 802.1Q VLAN tagging, encapsulating packets from VLANs fortransmission multiplexed with other VLAN traffic over an Ethernet trunk.Examples of EtherTypes include IPV4, IPv6, Address Resolution Protocol(ARP), AppleTalk, IPX, and others. A cloud network that supports Layer-2protocols can support any protocol at the Layer-3 layer. In a similarmanner, when the cloud infrastructure provides support for a Layer-3protocol, it can support various protocols at Layer-4 such as TCP, UDP,ICMP, and others. The network can be agnostic to the Layer-4 protocolswhen virtualization is provided at Layer-3. Similarly, the network canbe agnostic to Layer-3 protocols when virtualization is provided atLayer-2. This technology can be extended to support any Layer-2 networktype, including FDDI, Infiniband, etc.

Accordingly, many applications written for physical networks, especiallyones that work with clusters of computer nodes that share a broadcastdomain use Layer-2 features that are not supported by in an L3 virtualnetwork. The following six examples highlight the complications that canresult from not providing Layer-2 networking capabilities:

(1) Assignment of MACs and IPs without a preceding API call. Networkappliances and Hypervisors (such as VMware) were not built for cloudvirtual networks. They assume they are able to use a MAC so long as itis unique and either get a dynamic address from a DHCP server or use anyIP that was assigned to the cluster. There is often no mechanism bywhich they can be configured to inform the control-plane about theassignment of these Layer-2 and Layer-3 addresses. If where the MACs andIPs are is not known, the Layer-3 virtual network does not know where tosend the traffic.

(2) Low latency reassignment of MACs and IPs for high-availability andlive migration. Many on-premises applications use ARP to reassign IPsand MACs for high availability—when an instance in a cluster or HA pairstops responding, the newly active instance will send a Gratuitous ARP(GARP) to reassign a service IP to its MAC or a Reverse ARP (RARP) toreassign a service MAC to its interface. This is also important whenlive-migrating an instance on a hypervisor: the new host must send aRARP when the guest has migrated so that guest traffic is sent to thenew host. Not only is the assignment done without an API call, but italso needs to be extremely low latency (sub-millisecond). This cannot beaccomplished with HTTPS calls to a REST endpoint.

(3) Interface multiplexing by MAC address. When hypervisors hostmultiple virtual machines on a single host, all of which are on the samenetwork, guest interfaces are differentiated by their MAC. This requiressupport for multiple MACs on the same virtual interface.

(4) VLAN Support. A single physical virtual machine Host will need to beon multiple broadcast domains as indicated by the use of a VLAN tag. Forexample, VMware ESX uses VLANs for traffic separation (e.g. guestvirtual machines may communicate on one VLAN, storage on another, andhost virtual machines on yet another).

(5) Use of broadcast and multicast traffic. ARP requires L2 broadcast,and there are examples of on-premises applications using broadcast andmulticast traffic for cluster and HA applications.

6) Support for Non-IP traffic. Since the L3 network requires the IPv4 orIPv6 header to communicate, use of any L3 protocol other than IP willnot work. L2 virtualization means that the network within the VLAN canbe L3 protocol agnostic—the L3 header could by IPv4, IPv6, IPX, oranything else—even absent all together.

As disclosed herein, a Layer 2 (L2) network can be created within acloud network. This virtual L2 network includes one or severalvirtualized L2 VLANs (referred to herein as VLANs). Each VLAN caninclude a plurality of compute instances, each of which can beassociated with at least one L2 virtual interface (e.g., a L2 VNIC) anda local switch. In some embodiments, each pair of L2 VNIC and switch ishosted on an NVD. An NVD may host multiple of such pairs, where eachpair is associated with a different compute instance. The collection oflocal switches represent an emulated single switch of the VLAN. The L2VNICs represent a collection of ports on the emulated single switch. TheVLAN can be connected, via a VLAN Switching and Routing Service (VSRS),also referred to herein as, a Real Virtual Router (RVR) or as an L2VSRS, to other VLANs, Layer 3 (L3) networks, on-premise networks, and/orother networks.

With reference now to FIG. 6 , a schematic illustration of oneembodiment of a computing network is shown. A VCN 602 resides of a CSPI601. The VCN 602 includes a plurality gateways connecting the VCN 602 toother networks. These gateways include DRG 604 which can connect the VCN602 to, for example, an on-premise network such as on-premise datacenter 606. The gateways can further include gateway 600, which caninclude, for example, a LPG for connecting the VCN 602 with another VCN,and/or an IGW and/or NAT gateway for connecting the VCN 602 to theinternet. The gateways of the VCN 602 can further include a servicesgateway 610 which can connect the VCN 602 with a services network 612.The services network 612 can include one or several databases and/orstores including, for example, autonomous database 614 and/or objectstore 616. The services network can comprise a conceptual networkcomprising an aggregation of IP ranges, which can be, for example,public IP ranges. In some embodiments, these IP ranges can cover some orall of the public services offered by the CSPI 601 provider. Theseservices can, for example, be accessed through an Internet Gateway orNAT Gateway. In some embodiments, the services network provides a wayfor the services in the services network to be accessed from the localregion through a dedicated gateway for that purpose (a Service Gateway).In some embodiments, the backends of these services can be implementedin, for example, their own private networks. In some embodiments, theservices network 612 can include further additional databases.

The VCN 602 can include a plurality of virtual networks. These networkscan, each include one or several compute instances which can communicatewithin their respective networks, between networks, or outside of theVCN 602. One of the virtual networks of the VCN 602 is an L3 subnet 620.The L3 subnet 620 is a unit of configuration or a subdivision createdwithin the VCN 602. The subnet 620 can comprise a virtual Layer 3network in the virtualized cloud environment of the VCN 602, which VCN602 is hosted on the underlying physical network of CPSI 601. AlthoughFIG. 6 depicts a single subnet 620, the VCN 602 can have one or multiplesubnets. Each subnet within the VCN 602 can be associated with acontiguous range of overlay IP addresses (e.g., 10.0.0.0/24 and10.0.1.0/24) that do not overlap with other subnets in that VCN andwhich represent an address space subset within the address space of theVCN. In some embodiments, this IP address space can be isolated from anaddress space associated with CPSI 601.

The subnet 620 includes one or more compute instances, and specificallyincludes a first compute instance 622-A and a second compute instance622-B. The compute instances 622-A, 622-B can communicate with eachother within the subnet 620, or they can communicate with otherinstances, devices, and/or networks outside of the subnet 620.Communication outside of the subnet 620 is enabled by a virtual router(VR) 624. The VR 624 enables communications between the subnet 620 andother networks of the VCN 602. For the subnet 620, the VR 624 representsa logical gateway that enables the subnet 620 (i.e., the computeinstances 622-A, 622-B) to communicate with endpoints on other networkswithin the VCN 602, and with other endpoints outside the VCN 602.

The VCN 602 can further include additional networks, and specificallycan include one or several L2 VLANs (referred to herein as VLANs), whichare examples of a virtual L2 network. These one or several VLANs caneach comprise a virtual Layer 2 network that is localized in the cloudenvironment of the VCN 602 and/or that is hosted by the underlyingphysical network of the CPSI 601. In the embodiment of FIG. 6 , the VCN602 includes a VLAN A 630 and a VLAN B 640. Each VLAN 630, 640 withinthe VCN 602 can be associated with a contiguous range of overlay IPaddresses (e.g., 10.0.0.0/24 and 10.0.1.0/24) that do not overlap withother networks in that VCN, such as other subnets or VLANs in that VCN,and which represent an address space subset within the address space ofthe VCN. In some embodiments, this IP address space of the VLAN can beisolated from an address space associated with CPSI 601.

Each of the VLANs 630, 640 can include one or several compute instances,and specifically, VLAN A 630 can include, for example, a first computeinstance 632-A, and a second compute instance 632-B. In some embodimentsVLAN A 630 can include additional compute instances. VLAN B 640 caninclude, for example, a first compute instance 642-A, and a secondcompute instance 642-B. Each of the compute instances 632-A, 632-B,642-A, 642-B can have an IP address and a MAC address. These addressescan be assigned or generated in any desired manner. In some embodiments,these addresses can be within a CIDR of the VLAN of the computeinstances, and in some embodiments, these addresses can be anyaddresses. In embodiments in which compute instances of a VLANcommunicate with endpoints outside of the VLAN, then one or both ofthese addresses are from the VLAN CIDR, whereas when all communicationsare intra-VLAN, then these addresses are not limited to addresses withinthe VLAN CIDR. In contrast to a network in which addresses are assignedby a control plane, the IP and/or MAC addresses of the compute instancesin the VLAN can be assigned by the user/customer of that VLAN, and theseIP and/or MAC addresses can then be discovered and/or learned by thecompute instances in the VLAN according to the processes for learningdiscussed below.

Each of the VLANs can include a VLAN Switching and Routing Service(VSRS), and specifically, VLAN A 630 includes VSRS A 634 and VLAN B 640includes VSRS B 644. Each VSRS 634, 644 participates in Layer 2switching and local learning within a VLAN and also performs allnecessary Layer 3 network functions including ARP, NDP, and routing.VSRS performs ARP (which is a Layer 2 protocol) as the VSRS has to mapIPs to MACs.

In these cloud-based VLANs, each virtual interface or virtual gatewaycan be associated with one or more media access control (MAC) addresses,which can be virtual MAC addresses. Within the VLAN, the one or severalcompute instances 632-A, 632-B, 642-A, 642-B, which can be, for examplebare metal, VM, or container, and/or one or several service instances,can directly communicate with each other via a virtual switch.Communication outside of the VLAN, such as with other VLANs or with anL3 network is enabled via the VSRS 634, 644. The VSRS 634, 644 is adistributed service providing the Layer 3 functions, such as IP routing,for a VLAN network. In some embodiments, the VSRS 634, 644 is ahorizontally scalable, highly available routing service that can sit atthe intersection of IP networks and L2 networks and participate in IProuting and L2 learning within a cloud-based L2 domain.

The VSRS 634, 644 can be distributed across multiple nodes within theinfrastructure, and the VSRS 634, 644 function can be scalable, andspecifically can be horizontally scalable. In some embodiments, each ofthe nodes implementing the function of the VSRS 634, 644 share andreplicate the function of a router and/or a switch with each other.Further, these nodes can present themselves as a single VSRS 634, 644 toall of the instances in the VLAN 630, 640. The VSRS 634, 644 can beimplemented on any virtualization device within the CSPI 601, andspecifically within the virtual network. Thus, in some embodiments, theVSRS 634, 644 can be implemented on any of the virtual networkvirtualization devices including NICs, SmartNICs, switches, Smartswitches or general compute hosts.

The VSRS 634, 644 can be a service residing on one or several hardwarenodes, such as one or several servers, such as for example, one orseveral x86 servers, or one or several networking devices, such as oneor several NICs and specifically one or several SmartNICs, supportingthe cloud network. In some embodiments, the VSRS 634, 644 can beimplemented on a server fleet. Thus, the VSRS 634, 644 can be a servicedistributed across a fleet of nodes, which may be a centrally managedfleet or may be distributed to the edges, of virtual networkingenforcers that participates in and shares L2 and L3 learning along withevaluating routing and security policies. In some embodiments each ofthe VSRS instances can update other VSRS instances with new mappinginformation as this new mapping information is learned by a VSRSinstance. For example, when a VSRS instance learns IP, interface, and/orMAC mapping for one or several CIs in its VLAN, the VSRS instance canprovide that updated information to other VSRS instances within the VCN.Via this cross-updating, a VSRS instance associated with a first VLANcan know the mappings, including IP, interface, and/or MAC mappings forCIs in other VLANs, in some embodiments, for CIs in other VLANs withinthe VCN 602. When the VSRS resides on a server fleet and/or isdistributed across a fleet of nodes, these updates can be greatlyexpedited.

In some embodiments, the VSRS 634, 644 may also host one or severalhigher level services necessary for networking including, but notlimited to: a DHCP relay; a DHCP (hosting); a DHCPv6; a neighbordiscovery protocol such as IPv6 Neighbor Discovery Protocol; a DNS; ahosting DNSv6; a SLAAC for IPv6; a NTP; a metadata service; andblockstore mount points. In some embodiments, the VSRS can support oneor several Network Address Translation (NAT) functions to translatebetween network address spaces. In some embodiments, the VSRS canincorporate anti-spoofing, anti-MAC spoofing, ARP-cache poisoningprotection for IPv4, IPv6 Route Advertisement (RA) guarding, DHCPguarding, packet filtering using Access Control Lists (ACLs); and/orreverse path forwarding checks. The VSRS can implement functionsincluding, for example, ARP, GARP, Packet Filters (ACLs), DHCP relay,and/or IP routing protocols. The VSRS 634, 644 can, for example, learnMAC addresses, invalidate expired MAC addresses, handle moves of MACaddresses, vet MAC address information, handling flooding of MACinformation, handling of storm control, loop prevention, Layer 2multicast via, for example, protocols such as IGMP in the cloud,statistic gathering including logs, statistics using SNMP, monitoring,and/or gathering and using statistics for broadcast, total traffic,bits, spanning tree packets, or the like.

Within the virtual network, the VSRS 634, 644 can manifest as differentinstantiations. In some embodiments, each of these instantiations of theVSRS can be associated with a VLAN 630, 640, and in some embodimentseach VLAN 630, 640 can have an instantiation of the VSRS 634, 644. Insome embodiments, each instantiation of the VSRS 634, 644 can have oneor several unique tables corresponding to the VLAN 630, 640 with whichthe instantiation of the VSRS 634, 644 is associated. Each instantiationof the VSRS 634, 644 can generate and/or curate the unique tablesassociated with that instantiation of the VSRS 634, 644. Thus, while asingle service may provide VSRS 634, 644 functionality for one orseveral cloud networks, individual instantiations of the VSRS 634, 644within the cloud network can have unique Layer 2 and Layer 3 forwardingtables, while multiple such customer networks can have over-lappingLayer 2 and Layer 3 forwarding tables.

In some embodiments, the VSRS 634, 644 can support conflicting VLAN andIP spaces across multiple tenants. This can include having multipletenants on the same VSRS 634, 644. In some embodiments, some or all ofthese tenants could choose to use some or all of: the same IP addressspace, the same MAC space, and the same VLAN space. This can provideextreme flexibility for users in choosing addresses. In someembodiments, this multitenancy is supported via providing each tenantwith a distinct virtual network, which virtual network is a privatenetwork within the cloud network. Each virtual network is given a uniqueidentifier. Similarly, in some embodiments, each host can have a uniqueidentifier, and/or each virtual interface or virtual gateway can have aunique identifier. In some embodiments, these unique identifiers, andspecifically the unique identifier of the virtual network for a tenantcan be encoded in each communication. By providing each virtual networkwith a unique identifier and including this within communications, asingle instantiation of the VSRS 634, 644 can service multiple tenantshaving overlapping address and/or name spaces.

The VSRS 634, 644 can perform these switching and/or routing functionsto facilitate and/or enable the creation and/or communication with an L2network within the VLAN 630, 640. This VLAN 630, 640 can be found withina cloud computing environment, and more specifically within a virtualnetwork in that cloud computing environment.

For example, each of VLAN 630, 640 include multiple compute instances632-A, 632-B, 642-A, 642-B. The VSRS 634, 644 enables communicationbetween a compute instance in one VLAN 630, 640 with a compute instancein another VLAN 630, 640 or in the subnet 620. In some embodiments, theVSRS 634, 644 enables communication between a compute instance in oneVLAN 630, 640 with another VCN, another network outside of the VCNincluding the internet, an on-premise data center, or the like. In suchan embodiment, for example, a compute instance, such as compute instance632-A, can send a communication to an endpoint outside of the VLAN, inthis instance, outside of L2 VLAN A 630. The compute instance (632-A)can send a communication to VSRS A 634, which can direct thecommunication to a router 624, 644 or gateway 604, 608, 610communicatively coupled with the desired endpoint. The router 624, 644or gateway 604, 608, 610 communicatively coupled with the desiredendpoint can receive the communication from the compute instance (632-A)and can direct the communication to the desired endpoint.

With reference now to FIG. 7 , a logical and hardware schematicillustration of VLAN 700 is shown. As seen, the VLAN 700 includes aplurality of endpoints, and specifically includes a plurality of computeinstances and a VSRS. The plurality of compute instances (CIs) areinstantiated on one or several host machines. In some embodiments, thiscan be in a one-to-one relationship such that each CI is instantiated ona unique host machine, and/or in some embodiments, this can be in amany-to-one relationship such that a plurality of CIs are instantiatedon a single, common host machine. In the various embodiments, the CIscan be Layer 2 CIs by being configured to communicate with each otherusing L2 protocols. FIG. 7 depicts a scenario in which some CIs areinstantiated on unique host machines and in which some CIs share acommon host machine. As seen in FIG. 7 , Instance 1 (CI1) 704-A isinstantiated on host machine 1 702-A, instance 2 (CI2) 704-B isinstantiated on host machine 2 702-B, and instances 3 (CI3) 704-C andinstance 4 (CI4) 704-D are instantiated on a common host machine 702-C.

Each of the CIs 704-A, 704-B, 704-C, 704-D is communicatively coupledwith other CIs 704-A, 704-B, 704-C, 704-D in the VLAN 700 and with VSRS714. Specifically, each of the CIs 704-A, 704-B, 704-C, 704-D isconnected to the other CIs 704-A, 704-B, 704-C, 704-D in the VLAN 700and to the VSRS 714 via an L2 VNIC and a switch. Each CI 704-A, 704-B,704-C, 704-D is associated with a unique L2 VNIC and a switch. Theswitch can be an L2 virtual switch that is local and uniquely associatedwith and deployed for the L2 VNIC. Specifically, CI1 704-A is associatedwith L2 VNIC 1 708-A and switch 1 710-A, CI2 704-B is associated with L2VNIC 2 708-B and switch 710-B, CI3 704-C is associated with L2 VNIC 3708-C and switch 3 710-C, and CI4 704-D is associated with L2 VNIC 4708-D and switch 4 710-D.

In some embodiments, each L2 VNIC 708 and its associated switch 710 canbe instantiated on an NVD 706. This instantiation can be in a one-to-onerelationship such that a single L2 VNIC 708 and its associated switch710 are instantiated on a unique NVD 706, or this instantiation can bein a many-to-one relationship such that multiple L2 VNICs 708 and theirassociated switches 710 are instantiated on a single, common NVD 706.Specifically, L2 VNIC 1 708-A and switch 1 710-A are instantiated on NVD1 706-A, L2 VNIC 2 708-B and switch 2 710-B are instantiated on NVD 2,and both L2 VNIC 3 708-C and switch 3 710-C, and L2 VNIC 4 708-D, andswitch 710-D are instantiated on a common NVD, namely, NVD 706-C.

In some embodiments, the VSRS 714 can support conflicting VLAN and IPspaces across multiple tenants. This can include having multiple tenantson the same VSRS 714. In some embodiments, some or all of these tenantscould choose to use some or all of: the same IP address space, the sameMAC space, and the same VLAN space. This can provide extreme flexibilityfor users in choosing addresses. In some embodiments, this multitenancyis supported via providing each tenant with a distinct virtual network,which virtual network is a private network within the cloud network.Each virtual network (e.g., each VLAN or VCN) is given a uniqueidentifier such as a VCN identifier which can be a VLAN identifier. Thisunique identifier can be selected by, for example, the control plane,and specifically by the control plane of the CSPI. In some embodiments,this unique identifier can comprise one or several bits that can beincluded and/or used in packet encapsulation.

Similarly, in some embodiments, each host can have a unique identifier,and/or each virtual interface or virtual gateway can have a uniqueidentifier. In some embodiments, these unique identifiers, andspecifically the unique identifier of the virtual network for a tenantcan be encoded in each communication. By providing each virtual networkwith a unique identifier and including this within communications, asingle instantiation of the VSRS can service multiple tenants havingoverlapping address and/or name spaces.

In some embodiments, a VSRS 714 can determine to which tenant a packetbelongs based on the VCN identifier and/or the VLAN identifierassociated with a communication, and specifically inside of the VCNheader of the communication. In embodiments disclosed herein, acommunication leaving or entering a VLAN can have a VCN header which caninclude VLAN identifier. Based on the VCN header containing the VLANidentifier, the VSRS can determine tenancy, or in other words, therecipient VSRS can determine to which VLAN and/or to which tenant tosend the communication.

In addition, each compute instance that belongs to a VLAN (e.g., an L2compute instance) is given a unique interface identifier that identifiesthe L2 VNIC that is associated with the compute instance. The interfaceidentifier can be included in traffic from and/or to the computerinstance (e.g., by being included in a header of a frame) and can beused by an NVD to identify the L2 VNIC associated with the computeinstance. In other words, the interface identifier can uniquely indicatethe compute instance and/or its associated L2 VNIC. As indicated in FIG.7 , the switches 710-A, 710-B, 710-C, 710-D can together form an L2distributed switch 712, also referred to herein as distributed switch712. From a customer standpoint, each switch 710-A, 710-B, 710-C, 710-Din the L2 distributed switch 712 is a single switch that connects to allof the CIs in the VLAN. However, the distributed switch, which emulatesthe user experience of a single switch, is infinitely scalable andincludes a collection of local switches (e.g., in the illustrativeexample of FIG. 7 , the switches 710-A, 710-B, 710-C, 710-D). As shownin FIG. 7 , each CI executes on a host machine connected to a NVD. Foreach CI on a host connected to an NVD, the NVD hosts a Layer 2 VNIC anda local switch associated with the compute instance (e.g., an L2 virtualswitch, local to the NVD, associated with the Layer 2 VNIC, and beingone member or component of the L2 distributed switch 712). The Layer 2VNIC represents a port of the compute instance on the Layer 2 VLAN. Thelocal switch connects the L2 VNIC to other L2 VNICs (e.g., other ports)associated with other compute instances of the Layer 2 VLAN.

Each of the CIs 704-A, 704-B, 704-C, 704-D can communicate with theothers of the CIs 704-A, 704-B, 704-C, 704-D in the VLAN 700 or with theVSRS 714. One of CIs 704-A, 704-B, 704-C, 704-D sends a packet toanother of the CIs 704-A, 704-B, 704-C, 704-D or to the VSRS 714 bysending the packet to the MAC address and the interface of the recipientone of the CIs 704-A, 704-B, 704-C, 704-D or the VSRS 714. The MACaddress and the interface identifier can be included in a header of apacket. As explained herein above, the interface identifier can indicatethe L2 VNIC of the recipient one of the CIs 704-A, 704-B, 704-C, 704-Dor of the VSRS 714.

In one embodiment, the CD 704-A can be a source CI, L2 VNIC 708-A can bea source VNIC, and switch 710-A can be a source switch. In thisembodiment, CI3 704-C can be the destination CI, and L2 VNIC 3 708-C canbe the destination VNIC. The source CI can send a packet with a sourceMAC address and a destination MAC address. This packet can beintercepted by the NVD 706-A instantiating the source VNIC and thesource switch.

The L2 VNICs 708-A, 708-B, 708-C, 708-D can, for the VLAN 700, eachlearn mapping of MAC addresses to interface identifiers of the L2 VNICs.This mapping can be learned based on packets and/or communicationsreceived from within the VLAN 700. Based on this previously determinedmapping, the source VNIC can determine the interface identifier of thedestination interface associated with the destination CI within theVLAN, and can encapsulate the packet. In some embodiments, thisencapsulation can comprise a GENEVE encapsulation, and specifically anL2 GENEVE encapsulation, which encapsulation include the L2 (Ethernet)header of the packet being encapsulated. The encapsulated packet canidentify the destination MAC, the destination interface identifier, thesource MAC, and the source interface identifier.

The source VNIC can pass the encapsulated packet to the source switch,which source switch can direct the packet to the destination VNIC. Uponreceipt of the packet, the destination VNIC can decapsulate the packetand can then provide the packet to the destination CI.

With reference now to FIG. 8 , a logical schematic illustration ofmultiple connected L2 VLANs 800 is shown. In the specific embodimentdepicted in FIG. 8 , both VLANs are located in the same VCN. As seen,the multiple connected L2 VLANs 800 can include a first VLAN, VLAN A802-A and a second VLAN, VLAN B 802-B. Each of these VLANs 802-A, 802-Bcan include one or several CIs, each of which can have an associated L2VNIC and an associated L2 virtual switch. Further, each of these VLANs802-A, 802-B can include a VSRS.

Specifically, VLAN A 802-A can include instance 1 804-A connected to L2VNIC 1 806-A and switch 1 808-A, instance 2 804-B connected to L2 VNIC 2806-B and switch 808-B, and instance 3 804-C connected to L2 VNIC 3806-C and switch 3 808-C. VLAN B 802-B can include instance 4 804-Dconnected to L2 VNIC 4 806-D and switch 4 808-D, instance 5 804-Econnected to L2 VNIC 5 806-E and switch 808-E, and instance 6 804-Fconnected to L2 VNIC 6 806-F and switch 3 808-F. VLAN A 802-A canfurther include VSRS A 810-A, and VLAN B 802-B can include VSRS B 810-B.Each of the CIs 804-A, 804-B, 804-C of VLAN A 802-A can becommunicatively coupled to VSRS A 810-A, and each of the CIS 804-D,804-E, 804-F of VLAN B 802-B can be communicatively coupled to VSRS B810-B.

VLAN A 802-A can be communicatively coupled to VLAN B 802-B via theirrespective VSRS 810-A, 810-B. Each VSRS can likewise be coupled togateway 812, which can provide access to CIs 804-A, 804-B, 804-C, 804-D,804-E, 804-F in each VLAN 802-A, 802-B to other networks outside of theVCN in which the VLANs are 802-A, 802-B are located. In someembodiments, these networks can include, for example, one or severalon-premise networks, another VCN, a services network, a public networksuch as the internet, or the like.

Each of the CIs 804-A, 804-B, 804-C in VLAN A 802-A can communicate withthe CIs 804-D, 804-E, 804-F in VLAN B 802-B via the VSRS 810-A, 810-B ofeach VLAN 802-A, 802-B. For example, one of CIs 804-A, 804-B, 804-C,804-D, 804-E, 804-F in one of the VLANs 802-A, 802-B can send a packetto a CI 804-A, 804-B, 804-C, 804-D, 804-E, 804-F in the other of theVLANs 802-A, 802-B. This packet can exit the source VLAN via the VSRS ofthe source VLAN and can enter the destination VLAN, and be routed to thedestination CI via the destination VSRS.

In one embodiment, the CI 1 804-A can be a source CI, L2 VNIC 806-A canbe a source VNIC, and a switch 808-A can be a source switch. In thisembodiment, CI 5 804-E can be the destination CI, and L2 VNIC 5 806-Ecan be the destination VNIC. VSRS A 810-A can be the source VSRSidentified as SVSRS, and VSRS B 810-B can be the destination VSRS,identified as DVSRS.

Source CI can send a packet with a MAC address. This packet can beintercepted by the NVD instantiating source VNIC and the source switch.The source VNIC, encapsulates the packet. In some embodiments, thisencapsulation can comprise a Geneve encapsulation, and specifically anL2 Geneve encapsulation. The encapsulated packet can identify adestination address of the destination CI. In some embodiments, thisdestination address can also comprise a destination address of thedestination VSRS. The destination address of the destination CI caninclude a destination IP address, an destination MAC of the destinationCI, and/or a destination interface identifier of the destination VNIC ofthe destination CI. The destination address of the destination VSRS caninclude the IP address of the destination VSRS, an interface identifierof the destination VNIC associated with of the destination VSRS, and/orthe MAC address of the destination VSRS.

The source VSRS can receive the packet from the source switch, can lookup the VNIC mapping from the destination address of the packet, whichdestination address can be a destination IP address, and can forward thepacket to the destination VSRS. The destination VSRS can receive thepacket. Based on the destination address contained in the packet, thedestination VSRS can forward the packet to the destination VNIC. Thedestination VNIC can receive and decapsulate the packet and can thenprovide the packet to the destination CI.

With reference now to FIG. 9 , a logical schematic illustration ofmultiple connected L2 VLANs and a subnet 900 is shown. In the specificembodiment depicted in FIG. 9 , both VLANs and the subnet are located inthe same VCN. This is indicated as the virtual router and the VSRS ofboth of the VLANs and the subnet are directly connected, as opposed toconnected through a gateway.

As seen, this can include a first VLAN, VLAN A 902-A, a second VLAN,VLAN B 902-B, and subnet 930. Each of these VLANs 902-A, 902-B caninclude one or several CIs, each of which can have an associated L2 VNICand an associated L2 switch. Further, each of these VLANs 902-A, 902-Bcan include a VSRS. Likewise, the subnet 930, which can be an L3 subnet,can include one or several CIs, each of which can have an associated L3VNIC, and the L3 subnet 930 can include a virtual router 916.

Specifically, VLAN A 902-A can include instance 1 904-A connected to L2VNIC 1 906-A and switch 1 908-A, instance 2 904-B connected to L2 VNIC 2906-B and switch 908-B, and instance 3 904-C connected to L2 VNIC 3906-C and switch 3 908-C. VLAN B 902-B can include instance 4 904-Dconnected to L2 VNIC 4 906-D and switch 4 908-D, instance 5 904-Econnected to L2 VNIC 5 906-E and switch 908-E, and instance 6 904-Fconnected to L2 VNIC 6 906-F and switch 3 908-F. VLAN A 902-A canfurther include VSRS A 910-A, and VLAN B 902-B can include VSRS B 910-B.Each of the CIs 904-A, 904-B, 904-C of VLAN A 902-A can becommunicatively coupled to VSRS A 910-A, and each of the CIS 904-D,904-E, 904-F of VLAN B 902-B can be communicatively coupled to VSRS B910-B. L3 subnet 930 can include one or several CIs, and specificallycan include instance 7 904-G, which is communicatively coupled to L3VNIC 7 906-G. The L3 subnet 930 can include virtual router 916.

VLAN a 902-A can be communicatively coupled to VLAN B 902-B via theirrespective VSRS 910-A, 910-B. The L3 subnet 930 can be communicativelycoupled with VLAN a 902-A and VLAN B 902-B via virtual router 916. Eachof which virtual router 916 and VSRS instances 910-A, 910-B can likewisebe coupled to gateway 912, which can provide access for CIs 904-A,904-B, 904-C, 904-D, 904-E, 904-F, 904-G in each VLAN 902-A, 902-B andin the subnet 930 to other networks outside of the VCN in which theVLANs are 902-A, 902-B and subnet 930 are located. In some embodiments,these networks can include, for example, one or several on-premisenetworks, another VCN, a services network, a public network such as theinternet, or the like.

Each VSRS instance 910-A, 910-B can provide an egress pathway forpackets leaving the associated VLAN 902-A, 902-B, and an ingress pathwayfor packets entering the associated VLAN 902-A, 902-B. From the VSRSinstance 910-A, 910-B of a VLAN 902-A, 902-B, packets can be sent to anydesired endpoint, including an L2 endpoint such as an L2 CI in anotherVLAN either on the same VCN or on a different VCN or network, and/or toan L3 endpoint such as an L3 CI in a subnet either on the same VCN orone a different VCN or network.

In one embodiment, the CI 1 904-A can be a source CI, L2 VNIC 906-A canbe a source VNIC, and switch 908-A can be a source switch. In thisembodiment, CI 7 904-G can be the destination CI, and VNIC 7 906-G canbe the destination VNIC. VSRS A 910-A can be the source VSRS identifiedas SVSRS, and virtual router (VR) 916, can be the destination VR.

Source CI can send a packet with a MAC address. This packet can beintercepted by the NVD instantiating source VNIC and the source switch.The source VNIC, encapsulates the packet. In some embodiments, thisencapsulation can comprise a Geneve encapsulation, and specifically anL2 Geneve encapsulation. The encapsulated packet can identify adestination address of the destination CI. In some embodiments, thisdestination address can also comprise a destination address of the VSRSof the VLAN of the source CI. The destination address of the destinationCI can include a destination IP address, an destination MAC of thedestination CI, and/or a destination interface identifier of thedestination VNIC of the destination CI.

The source VSRS can receive the packet from the source switch, can lookup the VNIC mapping from the destination address of the packet, whichdestination address can be a destination IP address, and can forward thepacket to the destination VR. The destination VR can receive the packet.Based on the destination address contained in the packet, thedestination VR can forward the packet to the destination VNIC. Thedestination VNIC can receive and decapsulate the packet and can thenprovide the packet to the destination CI.

Learning within a Virtual L2 Network

With reference now to FIG. 10 , a schematic illustration of oneembodiment of intra-VLAN communication and learning within a VLAN 1000is shown. The learning here is specific to how an L2 VNIC, a VSRS VNIC,and/or an L2 virtual switch learn associations between MAC addresses andL2 VNICs/VSRS VNICs (more specifically, between MAC addresses associatedwith L2 compute instances or a VSRS and interface identifiers associatedwith L2 VNICS of these L2 compute instances or associated with a VSRSVNIC). Generally, the learning is based on ingress traffic. Thislearning, for an aspect of interface-to-MAC address learning, isdifferent from a learning process (e.g., an ARP process) that an L2compute instance may implement to learn a destination MAC address. Thetwo learning processes (e.g., of an L2 VNIC/L2 virtual switch and of anL2 compute instance) are illustrated as being jointly implemented inFIG. 12 .

As seen, the VLAN 1000 includes compute instance 1 1000-Acommunicatively coupled with NVD 1 1001-A which instantiates L2 VNIC 11002-A and L2 switch 1 1004-A. The VLAN 1000 also include computeinstance 2 1000-B communicatively coupled with NVD 2 1001-B whichinstantiates L2 VNIC 2 1002-B and L2 switch 2 1004-A. The VLAN 1000 alsoincludes VSRS 1010 running on a server fleet, and which includes VSRSVNIC 1002-C and VSRS switch 1004-C. All of the switches 1004-A, 1004-B,1004-C together form a distributed switch. VSRS 1010 is communicativelycoupled with an endpoint 1008 which can comprise a gateway, andspecifically can comprise L2/L3 router in, for example, the form ofanother VSRS, or an L3 router in, for example, the form of a virtualrouter.

A control plane 1001 of a VCN hosting the VLAN 1000 maintainsinformation identifying each L2 VNIC on the VLAN 1000 and networkplacement of the L2 VNIC. For example, this information can include foran L2 VNIC, the interface identifier associated with the L2 VNIC, and/orthe physical IP address of the NVD hosting the L2 VNIC. The controlplane 1001 updates, for example, periodically updates or updates ondemand, interfaces in the VLAN 1000 with this information. Thus, each L2VNIC 1002-A, 1002-B, 1002-C in the VLAN receives the information fromthe control plane 1001 identifying the interfaces in the VLAN, andpopulates a table with this information. The table populated by an L2VNIC can be stored locally to the NVD hosting the L2 VNIC. In the eventthat a L2 VNIC 1002-A, 1002-B, 1002-C already includes a current table,the L2 VNIC 1002-A, 1002-B, 1002-C can determine any discrepancy betweenthe L2 VNIC's 1002-A, 1002-B, 1002-C current table and theinformation/table received from the control plane 1001. The L2 VNIC1002-A, 1002-B, 1002-C can, in some embodiments, update its table tomatch information received from the control plane 1001.

As seen in FIG. 10 , packets are sent via an L2 switch 1004-A, 1004-B,1004-C, and are received by a recipient L2 VNIC 1002-A, 1002-B, 1002-C.As packets are received by a L2 VNIC 1002-A, 1002-B, 1002-C, that VNIClearns the mapping of the source interface (source VNIC) and source MACaddress of that packet. Based on its table of information received fromthe control plane 1010, the VNIC can map the source MAC address (from areceived packet, also referred to herein as a frame) to an interfaceidentifier of the source VNIC and the IP address of the VNIC and/or IPaddress of the NVD hosting the VNIC (where the interface identifier andIP address(es) are available from the table). As such, a L2 VNIC 1002-A,1002-B, 1002-C learns mapping of interface identifiers to MAC addressesbased on received communications and/or packets, the L2 VNIC 1002-A,1002-B, 1002-C can update its table, L2 FWD table 1006-A, 1006-B, 1006-Cwith this learned mapping information. In some embodiments, an L2forwarding table includes and associates a MAC address with at least oneof an interface identifier, or a physical IP address. In suchembodiments, the MAC address is an address assigned to an L2 computeinstance and can correspond to a port emulated by an L2 VNIC associatedwith the L2 compute instance. The interface identifier can uniquelyidentify the L2 VNIC and/or the L2 compute instance. The virtual IPaddress can be that of the L2 VNIC. And the physical IP address can bethat of the NVD hosting the L2 VNIC. The L2 forwarding updated by an L2VNIC can be stored locally on the NVD hosting the L2 VNIC and used bythe L2 virtual switch associated with the L2 VNIC to direct frames. Insome embodiments, L2 VNICs within a common VLAN can share all orportions of their mapping table with each other.

In light of the above network architecture, traffic flows are describedherein next. In the interest of clarity of explanation, the trafficflows are described in connection with compute instance 2 1000-B, L2VNIC 2 10002-B, L2 switch 2 1004-B, and NVD 2 1001-B. The descriptionequivalently applies to traffic flows to and/or from other computeinstances.

As explained herein above, the VLAN is implemented within a VCN as anoverlay L2 network on top of an L3 physical network. An L2 computeinstance of the VLAN can send or receive an L2 frame that includesoverlay MAC addresses (also referred to as virtual MAC addresses) assource and destination MAC addresses. The L2 frame can also encapsulatea packet that includes overlay IP addresses (also referred to as virtualIP addresses) as source and destination IP addresses. The overlay IPaddress of the compute instance can, in some embodiments, belong to aCIDR range of the VLAN. The other overlay IP address can belong to theCIDR range (in which case, the L2 frame flows within the VLAN) oroutside the CIDR range (in which case, the L2 frame is destined to orreceived from another network). The L2 frame can also include a VLAN tagthat uniquely identifies the VLAN and a VLAN tag, which VLAN tag can beused to distinguish against multiple L2 VNICs on the same NVD The L2frame can be received in an encapsulated packet by the NVD via a tunnelfrom the host machine of the compute instance, from another NVD, or fromthe server fleet hosting the VSRS. In these different cases, theencapsulated packet can be an L3 packet sent on the physical network,where the source and destination IP addresses are physical IP addresses.Different types of encapsulation are possible, including Geneveencapsulation. The NVD can decapsulate the received packet to extractthe L2 frame. Similarly, to send an L2 frame, the NVD can encapsulate itin an L3 packet and send it on the physical substrate.

For intra-VLAN egress traffic from the instance 2 1000-B, NVD 2 1001-Breceives a frame from the host machine of instance 2 1000-B over anEthernet link. The frame includes an interface identifier thatidentifies L2 VNIC 2 1000-B. The frame includes the overlay MAC addressof instance 2 1000-B (e.g., M.2) as the source MAC address and theoverlay MAC address of instance 1 1000-A (e.g., M.1) as the destinationMAC address. Given the interface identifier, NVD 2 1001-B passes theframe to L2 VNIC 2 1002-B for further processing. L2 VNIC 2 1002-Bforwards the frame to L2 switch 2 1004-B. Based on L2 forwarding table1006-B, L2 switch 2 1004-B determines whether the destination MACaddress is known (e.g., matches with an entry in L2 forwarding table1006-B).

If known, L2 switch 2 1004-B determines that L2 VNIC 1 1002-A is therelevant tunnel endpoint and forwards the frame to L2 VNIC 1 1002-A. Theforwarding can include encapsulation of the frame in a packet anddecapsulation of the packet (e.g., Geneve encapsulation anddecapsulation), where the packet includes the frame, the physical IPaddress of NVD 1 1001-A (e.g., IP.1) as the destination address, and thephysical IP address of NVD 2 1001-B (e.g., IP.2) as the source address.

If unknown, L2 switch 2 1004-B broadcasts the frame to the various L2VNICs of the VLAN (e.g., including L2 VNIC 1 1002-A and any other L2VNIC of the VLAN), where the broadcasted frames are processed (e.g.,encapsulated, sent, decaspulated) between the relevant NVDs. In someembodiments, this broadcast can be performed, or more specifically,emulated, at the physical network, encapsulating the frame separately toeach L2 VNIC, including the VSRS in the VLAN. Thus, the broadcast isemulated via a series of replicated unicast packets at the physicalnetwork. In turn, each L2 VNIC receives the frame and learns theassociation between the interface identifier of L2 VNIC 2 1002-B and thesource MAC address (e.g., M.2) and the source physical IP address (e.g.,IP.2).

For intra-VLAN ingress traffic to compute instance 2 1000-B from computeinstance 1 1000-A, NVD 2 1001-B receives a packet from NVD 1. The packethas IP.1 as the source address and a frame, where the frame includes M.2as the destination MAC address and M.1 as the source MAC address. Theframe also includes the network identifier of L2 VNIC 1 1002-A. Upondecapsulation, L2 VNIC 2 receives the frame and learns that thisinterface identifier is associated with M.1 and/or with IP.1 and stores,if previously unknown, this learned information in L2 forwarding table1006-B, at switch 2, for subsequent egress traffic. Alternatively, upondecapsulation, L2 VNIC 2 receives the frame and learns that thisinterface identifier is associated with M.1 and/or with IP.1 andrefreshes the expiration time if this information is already known.

For egress traffic sent from instance 2 1000-B in the VLAN 1000 to aninstance in another VLAN, a similar flow as the above egress traffic canexist, except that the VSRS VNIC and VSRS switch are used. Inparticular, the destination MAC address is not within the L2 broadcastof the VLAN 1000 (it is within the other L2 VLAN). Accordingly, theoverlay destination IP address (e.g., IP.A) of the destination instanceis used for this egress traffic. For example, L2 VNIC 2 1002-Bdetermines that IP.A is outside of the CIDR range of the VLAN 1000.Accordingly, L2 VNIC 2 1002-B sets a destination MAC address to adefault gateway MAC address (e.g., M.DG). Based on M.DG, the L2 switch 21004-B sends the egress traffic to the VSRS VNIC (e.g., via a tunnel,with the proper end-to-end encapsulation). The VSRS VNIC forwards theegress traffic to the VSRS switch. In turn, the VSRS switch performs arouting function, where, based on the overlay destination IP address(e.g., IP.A), the VSRS switch of the VLAN 1000 sends the egress trafficto the VSRS switch of the other VLAN (e.g., via the virtual routerbetween these two VLANs, also with the proper end-to-end encapsulation).Next, the VSRS switch of the other VLAN performs a switching function bydetermining that IP.A is within the CIDR range of this VLAN and performsa look-up of its ARP cache based on IP.A to determine the destinationMAC address associated with IP.A. If no match exists in the ARP cache,ARP requests are sent to the different L2 VNICs of the other VLAN todetermine the destination MAC address. Otherwise, the VSRS switch sendsthe egress traffic to the relevant VNIC (e.g., via a tunnel, with theproper encapsulation).

For ingress traffic to an instance in the VLAN 1000 from an instance inanother VLAN, the traffic flow is similar to the above, except in theopposite direction. For egress traffic from an instance in the VLAN 1000to an L3 network, the traffic flow is similar to the above except thatthe VSRS switch of the VLAN 1000 routes the packet directly to thedestination VNIC in the virtual L3 network via the virtual router (e.g.,without having to route the packet through another VSRS switch). Foringress traffic to an instance in the VLAN 1000 from a virtual L3network, the traffic flow is similar to the above except that the packetis received by the VSRS switch of the VLAN 1000 A that sends it withinthe VLAN as a frame. For traffic (egress or ingress) between the VLAN1000 and other networks, the VSRS switch is similarly used, where itsrouting function is used on the egress to send a packet via the propergateway (e.g., IGW, NGW, DRG, SGW, LPG), and where its switchingfunction is used on the ingress to send a frame within the VLAN 1000.

With reference now to FIG. 11 , a schematic illustration of anembodiment of a VLAN 1100 (e.g., a cloud-based Virtual L2 network) isshown, and specifically an implementation view of the VLAN is shown.

As described herein above, the VLAN can include “n” compute instances1102-A, 1102-B, 1102-N, each of which executes on a host machine. Aspreviously discussed, there can be a one-to-one association between acompute instance and a host machine, or a many-to-one associationbetween a plurality of compute instances and a single host machine. Eachcompute instance 1102-A, 1102-B, 1102-N can be an L2 compute instance,in which case, it is associated with at least one virtual interface(e.g., an L2 VNIC) 1104-A, 1104-B, 1104-N and a switch 1106-A, 1106-B,1106-N. The switches 1106-A, 1106-B, 1106-N are L2 virtual switches andtogether form an L2 distributed switch 1107.

The pair of L2 VNIC 1104-A, 1104-B, 1104-N and switch 1106-A, 1106-B,1106-N associated with a compute instance 1102-A, 1102-B, 1102-N on ahost machine is a pair of software modules on a NVD 1108-A, 1108-B,1108-N connected to the host machine. Each L2 VNIC 1104-A, 1104-B,1104-N represents an L2 port of the customer's perceived single switch(referred to herein as vswitch). Generally, a host machine “i” executesa compute instance “i” and is connected to NVD “i”. In turn, NVD “i”executes L2 VNIC “i” and “switch “i”. L2 VNIC “i” represents an L2 port“i” of the vswitch. “i” is a positive integer between 1 and “n”. Herealso, although one-to-one associations are described, other types ofassociations are possible. For instance, a single NVD can be connectedto multiple hosts, each executing one or more compute instances thatbelong to the VLAN. If so, the NVD hosts multiple pairs of L2 VNIC andswitch, each corresponding to one of the compute instances.

The VLAN can include an instance of a VSRS 1110. The VSRS 1110 performsswitching and routing functionalities and includes an VSRS VNIC 1112 andan instance of a VSRS switch 1114. The VSRS VNIC 1112 represents a porton the vswitch, where this port connects the vswitch to other networksvia a virtual router. As shown, the VSRS 1110 can be instantiated on aserver fleet 1116.

A control plane 1118 can track information identifying L2 VNICs 1104-A,1104-B, 1104-N and their placements in the VLAN. The control plane 1110can further provide this information to the interfaces 1104-A, 1104-B,1104-N in the VLAN.

As shown in FIG. 11 , the VLAN can be a cloud-based virtual L2 networkthat can be built on top of the physical network 1120. In someembodiments, this physical network 1120 can include the NVDs 1108-A,1108-B, 1108-N.

Generally, a first L2 compute instance of the VLAN (e.g., computeinstance 1 1102-A) can communicate with a second compute instance of theVLAN (e.g., compute instance 2 1102-B) using L2 protocols. For instance,a frame can be sent between these two L2 compute instances over theVLAN. Nonetheless, the frame can be encapsulated, tunneled, routed,and/or subject to other processing such that the frame can sent over theunderlying physical network 1120.

For example, the compute instance 1 1102-A sends a frame destined to thecompute instance 2 1102-B. Depending on the network connections betweenhost machine 1 and NVD 1, NVD1 and the physical network 1120, thephysical network 1120 NVD 2, and NVD 2 and host machine 2 (e.g., TCP/IPconnections, Ethernet connections, tunneling connections, etc.),different types of processing can be applied to the frame. For instance,the frame is received by NVD 1 and encapsulated, and so on and so forth,until the frame reaches the compute instance 2. This processing suchthat the frame can be sent between the underlying physical resources isassumed and, for the purpose of brevity and clarity, its description isomitted from the description the VLAN and the related L2 operations.

Virtual L2 Network Communication

Multiple forms of communication can occur within or with a virtual L2network. These can include intra-VLAN communications. In such anembodiments, a source compute instance can send a packet to adestination compute instance that is in the same VLAN as the sourcecompute instance (CI). The communication can further include the sendingof a packet to an endpoint outside of the VLAN of the source CI. Thiscan include, for example, a communication between a source CI in a firstVLAN to a destination CI in a second VLAN, a communication between asource CI in a first VLAN to a destination CI in a L3 subnet, and/or acommunication from a source CI in a first VLAN to a destination CIoutside of the VCN containing the VLAN of the source CI. Thiscommunication can further include, for example, receiving acommunication at a destination CI from a source CI outside of the VLANof the destination CI. This source CI can be in another VLAN, in a L3subnet, or outside of the VCN containing the VLAN of the source CI.

Each CI within a VLAN can play an active role in the traffic flow. Thisincludes learning interface identifier-to-MAC address, also referred toherein as interface-to-MAC address, mapping of instances within the VLANto maintain L2 forwarding tables within the VLAN, and the sending and/orreceiving of communication packets. The VSRS can play an active role incommunication within the VLAN and in communication with source ordestination CIs outside of the VLAN. The VSRS can maintain a presence inthe L2 network and in the L3 network to enable the egress and ingresscommunication.

Intra-VLAN Communication

With reference now to FIG. 12 , a flowchart illustrating one embodimentof a process 1200 for intra-VLAN communication is shown. In someembodiments, the process 1200 can be performed by the compute instanceswithin a common VLAN. The process can be specifically performed in theevent that a source CI sends a packet to a destination CI within theVLAN, but does not know the IP-to-MAC address mapping of thatdestination CI. This can occur, for example, when a source CI sends apacket to destination CI having an IP address in the VLAN, but thesource CI does not know the MAC address for that IP address. In thiscase, an ARP process can be performed to learn the destination MACaddress and the IP-to-MAC address mapping.

In the event that the source CI knows the IP-to-MAC address mapping, thesource CI can send the packet directly to the destination CI, and theARP process need not be performed. In some embodiments, this packet canbe intercepted by the source VNIC, which source VNIC in intra-VLANcommunication is an L2 VNIC. If the source VNIC knows interface-to-MACaddress mapping for destination MAC address, then the source VNIC canencapsulate the packet, for example in an L2 encapsulation, and canforward the encapsulated packet to the destination VNIC, whichdestination VNIC in intra-VLAN communication is an L2 VNIC, for thedestination MAC address.

If the source VNIC does not know the interface-to-MAC address mappingfor the MAC address, then the source VNIC can perform an aspect of aninterface-to-MAC address learning process. This can include the sourceVNIC sending the packet to all interfaces within the VLAN. In someembodiments, this packet can be sent via broadcast to all of theinterfaces within the VLAN. In some embodiments, this broadcast can beimplemented at the physical network in the form of serial unicast. Thispacket can include the destination MAC and IP addresses, and theinterface, MAC address, and IP address of the source VNIC. Each of theVNICs in the VLAN can receive this packet and can learn theinterface-to-MAC address mapping of the source VNIC.

Each of the receiving VNICs can further decapsulate the packet andforward the decapsulated packet to their associated CI. Each CI caninclude a network interface which can evaluate the forwarded packet. Ifthe network interface determines that the CI having received theforwarded packet does not match the destination MAC and/or IP address,then the packet is dropped. If the network interface determines that theCI having received the forwarded packet matches the destination MACand/or IP address, then the packet is received by the CI. In someembodiments, the CI having a MAC and/or IP address matching thedestination MAC and/or IP address of the packet can send a response tothe source CI, whereby the source VNIC can learn the interface-to-MACaddress mapping of the destination CI, and whereby the source CI canlearn the IP-to-MAC address mapping of the destination CI.

When the source CI does not know the IP-to-MAC address mapping, or whenthe source CI's IP-to-MAC address mapping for the destination CI isstale, then the process 1200 can be performed.

Thus, when the IP-to-MAC address mapping is known, then the source CIcan send the packet. When the IP-to-MAC address mapping is not known,then the process 1200 can be performed. When the interface-to-MACaddress mapping is not known, the interface-to-MAC address learningprocess outlined above can be performed. When the interface-to-MACaddress mapping is known, then the VNIC can send the packet to thedestination CI.

The process 1200 begins at block 1202, wherein the source CI determinesthat IP-to-MAC address mapping of the destination CI is unknown to thesource CI. In some embodiments, this can include the source CIdetermining a destination IP address for a packet, and determining thatthat destination IP address is not associated with a MAC address storedin a mapping table of the source CI. Alternatively, the source CI candetermine that the IP-to-MAC address mapping for the destination CI isstale. A mapping can be stale, in some embodiments, if the mapping hasnot been updated and/or verified within some time limit. Upondetermining that the IP-to-MAC address mapping of the destination CI isunknown and/or stale to the source CI, the source CI initiates an ARPrequest for the destination IP and sends the ARP request for Ethernetbroadcast.

At block 1204, the source VNIC, also referred to herein as the sourceinterface, receives the ARP request from the source CI. The sourceinterface identifies all interfaces on the VLAN, and sends the ARPrequest to all interfaces on the VLAN broadcast domain. As previouslymentioned, as the control plane knows all of the interfaces on the VLANand provides that information to the interfaces with the VLAN, thesource interface likewise knows all of the interfaces in the VLAN and isable to send the ARP request to each of the interfaces in the VLAN. Todo this, the source interface replicates the ARP request andencapsulates one of the ARP requests for each of the interfaces on theVLAN. Each encapsulated ARP request includes the source CI interfaceidentifier and source CI MAC and IP addresses, the target IP address,and the destination CI interface identifier. The source CI interfacereplicates an Ethernet broadcast by sending the replicated andencapsulated ARP requests as serial unicast, one sent to each interfacein the VLAN.

At block 1206, all interfaces in the VLAN broadcast domain receive anddecapsulate the packet. Each of the interfaces in the VLAN broadcastdomain that receives the packet learns the interface-to-MAC addressmapping of the source VNIC of the source CI (e.g., interface identifierof the source interface to MAC address of the source CI) as the packetidentifies the source CI MAC and IP addresses and the source CIinterface identifier. As part of learning the interface-to-MAC addressmapping for the source CI, each of the interfaces can update theirmapping tables (e.g., its L2 forwarding table), and can provide theupdated mapping to its associated switch and/or CI. Each recipientinterface, except the VSRS, can forward the decapsulated packet to theirassociated CI. The CI recipient of the forwarded decapsulated packet,and specifically the network interface of that CI, can determine if thetarget IP address of the packet matches the IP address of the CI. If theIP address of the CI associated with that interface does not match thedestination CI IP address specified in the received packet, then, insome embodiments, the packet is dropped by that CI, and no furtheraction is taken. In the case of the VSRS, the VSRS can determine if thetarget IP address of the packet matches the IP address of the VSRS. Ifthe IP address of the VSRS does not match the target IP addressspecified in the received packet, then, in some embodiments, the packetis dropped by the VSRS and no further action is taken.

If it is determined that the destination CI IP address specified in thereceived packet matches the IP address of the CI associated with therecipient interface (destination CI), then, and as indicated in block1208, the destination CI sends a response, which can be a unicast ARPresponse to the source interface. This response includes the destinationCI MAC address and the destination CI IP address, and the source CI IPand MAC addresses. As will be discussed below, if the VSRS determinesthat the target IP address matches the VSRS IP address, then the VSRScan send an ARP response.

This response is received by the destination interface whichencapsulates the unicast ARP response as indicated in block 1210. Insome embodiments, this encapsulation can comprise Geneve encapsulation.The destination interface can forward the encapsulated packet via thedestination switch to the source interface. The encapsulated packetincludes the destination CI MAC and IP addresses and destination CIinterface identifier, and the source CI MAC and IP addresses and thesource CI interface identifier.

At block 1212, the source interface receives and decapsulates the ARPresponse. The source interface can further learn the interface-to-MACaddress mapping for the destination CI based on information contained inthe encapsulation and/or in the encapsulated packet. The sourceinterface can, in some embodiments, forward the ARP response to thesource CI.

At block 1214, the source CI receives the ARP response. In someembodiments, the source CI can update a mapping table based oninformation contained in the ARP response, and specifically update amapping table to reflect the IP-to-MAC address mapping based on the MACand IP addresses of the destination CI. Subsequently, the source CI canthen send a packet, which can be any packet including an IP packet, andspecifically an IPv4 or IPv6 packet to the destination CI. This packetcan include the MAC address and the IP address of the source CI as thesource MAC address and source IP address of the packet, and the MACaddress and IP address of the destination CI as the destination MACaddress and destination IP address.

At block 1216, the source interface can receive the packet from thesource CI. The source interface can encapsulate the packet, and in someembodiments, can encapsulate the packet with a Geneve encapsulation. Thesource interface can forward the encapsulated packet to the destinationCI, and specifically to the destination interface. The encapsulatedpacket can include the IP and MAC addresses and interface identifier ofthe source CI as the source MAC address, source IP address, and sourceinterface identifier, and the MAC address, IP address, and interfaceidentifier of the destination CI as the destination MAC address, IPaddress, and destination interface identifier.

At block 1218, the destination interface receives the packet from thesource interface. The destination interface can decapsulate the packet,and can then forward the packet to the destination CI. At block 1220,the destination CI receives the packet from the destination interface.

With reference now to FIG. 13 , a schematic illustration 1300 of theprocess 1200 for intra-VLAN communication is shown. As seen, VLAN A 1302has a VLAN CIDR of 10.0.3.0/24. VLAN A 1302 includes a VSRS VNIC (VRVI)1304 which can be instantiated on one or several pieces of hardware, andspecifically can be instantiated on a server fleet 1306. VRVI 1304 canhave an IP address of 10.0.3.1. The VLAN can include compute instance 1(CI1) 1310 having an IP address of 10.0.3.2 and communicatively coupledwith NVD 1 (SN1) 1312 which can instantiate L2 VNIC 1 (VI1) 1314 and L2switch 1. The VLAN can include compute instance 2 (CI2) 1320 having anIP address of 10.0.3.3 and communicatively coupled with NVD 2 (SN2) 1322which can instantiate L2 VNIC 2 (VI2) 1324 and L2 switch 2. The VLAN caninclude compute instance 3 (CI3) 1330 having an IP address of 10.0.3.4and communicatively coupled with NVD 3 (SN3) 1332 which can instantiateL2 VNIC 3 (VI3) 1334 and L2 switch 3.

In the example of FIG. 13 , and applying the method 1200 of FIG. 12 ,CI3 1330 is the source CI and VI3 1334 is the source interface. Further,CI2 1320 is the destination CI and VI2 1324 is the destinationinterface. CI3 determines that it does not have an IP-to-MAC mapping fora destination IP address (10.0.3.3), resulting in CI3 1330 sending anARP request. The ARP request can be for the known address, andspecifically can be for the known IP address of CI2 1320. Thus, in someembodiments, the ARP request can be for 10.0.3.3.

This ARP request is received by SN3 1332 and VI3 1334. VI3 1334replicates the ARP request to create an ARP request for each CI in theVLAN 1302. VI3 1334 encapsulates each ARP request and sends an ARPrequest to each of the interfaces in the VLAN. These encapsulated ARPrequests can include information identifying the MAC address of thesource CI, CI3, the interface identifier of the source interface, VI3,and the destination MAC address. These requests can be sent to each ofthe interfaces in the VLAN as shown by arrows 1350. In the VLAN, theserequests can be broadcast ARP requests.

The interfaces in the VLAN receive the encapsulated ARP request, anddecapsulate the ARP request. Based on information contained in and/orassociated with the ARP request, the interfaces in the VLAN update theirmapping. Specifically, for example, each of VI1 1314, VI2 1324, and VRVI1304 receive an ARP request from CI 3 1330, decapsulate the ARP request,and learn the mapping of the interface-to-MAC address of the source CI,both of which interface identifier and MAC address are included in theencapsulated packet. VRVI 1304 can further update IP-to-MAC addressmapping for the source CI based on information contained in theencapsulated packet.

Interfaces in the VLAN having a CI with the requested IP address cansend an ARP response to CI 3 1330 as indicated with arrow 1352.Specifically, as shown in FIG. 13 , VI2 1324 is the interface of CI21320, and thus can send the ARP response. The ARP response from CI2 canbe received by VI2, can be encapsulated, and can be sent as an ARPunicast to the requesting interface, and specifically to VI3. Asindicated earlier in this application, the sending of this ARP responsecan include the providing of the encapsulated ARP response to theassociated switch, which can send the encapsulated ARP response to VI3.

The ARP response can be received by VI3 and can be decapsulated. VI3 canlearn mapping of the interface-to-MAC of CI2 based on the received ARPresponse, and can provide the updated learned mapping to VI3'sassociated switch. The decapsulated packet can be provided to CI3, whichcan learn IP-to-MAC address mapping of CI2 1320 based on thedecapsulated packet. CI3 can send a packet, which packet can be an IPpacket such as an IPv4 or IPv6 packet to CI2. This packet can have CI3'sMAC and IP addresses as source addresses, and can have CI2's IP and MACaddresses as destination addresses.

The packet sent by CI3 can be received by VI3, which can encapsulate thepacket and forward the packet to interface VI2. VI2 can receive thepacket, can decapsulate the packet, and can forward the packet to CI2.

Inter-VLAN Communication

With reference now to FIG. 14 , a flowchart illustrating one embodimentof a process 1400 for inter-VLAN communication in a virtual L2 networkis shown. The process 1400 can be performed by all or portions of twoconnected VLANs, such as the multiple connected L2 VLANs 800 shown inFIG. 8 . In some embodiments, the process 1400 can be performed when acompute instance (source CI) in a first VLAN (source VLAN) sends apacket to a destination compute instance (destination CI) in a secondVLAN (destination VLAN). In some embodiments, the source CI can, basedon the IP address of the destination CI, determine that the destinationCI is outside of the source VLAN. For example, the source CI candetermine that the destination IP is outside of the source VLAN CIDR. Insuch an event, the source CI can determine to send the IP packet to thedestination CI via the VSRS of the source VLAN. If the source CI alreadyknows the mapping of the VSRS in the first VLAN (source VSRS), then thesource CI can direct the packet directly to the source VSRS. If thesource CI does not know the mapping of the source VSRS, then the sourceCI and its associated VNIC (source interface or source VNIC) firstlearns the mapping of the source VSRS. In embodiments of inter-VLANcommunication, both the source and destination VNICs are L2 VNICs. Thefirst steps of process 1400, steps 1402 through 1410 relate to thelearning of the source VSRS mapping by the source VNIC and source CI.

The process 1400 begins at block 1402, wherein the source CI, which hasthe destination IP address, initiates an ARP request. The ARP request isused to determine the IP→MAC address mapping of the source VSRS. The ARPrequest is sent to Ethernet broadcast by the source CI. The ARP requestincludes the IP address of the source CI as the source IP and MACaddresses.

At block 1404, the source VNIC receives the ARP request and replicatesthe ARP request. Specifically, the source VNIC receives the ARP requestfrom the source CI, identifies all interfaces on the VLAN, and sends theARP request to all interfaces on the VLAN broadcast domain. Aspreviously mentioned, as the control plane knows all of the interfaceson the VLAN and provides that information to the interfaces with theVLAN, the source interface likewise knows all of the interfaces in theVLAN and is able to send the ARP request to each of the interfaces inthe VLAN. To do this, the source interface replicates the ARP requestand encapsulates one of the ARP requests for each of the interfaces onthe VLAN. Each encapsulated ARP request includes the source CI interfaceidentifier and source CI IP and MAC addresses as the source addresses,and the destination CI interface identifier and IP address asdestination addresses. The source CI interface implements the Ethernetbroadcast by sending the replicated and encapsulated ARP requests viaserial unicast to each interface in the VLAN. The source VNIC can, insome embodiments, encapsulate the ARP request with Geneve encapsulation.

At block 1406, all interfaces in the VLAN broadcast domain receive anddecapsulate the packet. Each of the interfaces in the VLAN broadcastdomain that receives the packet learns the interface→MAC address mappingof the source VNIC of the source CI as the packet identifies the sourceCI MAC and IP addresses and source interface identifier. As part oflearning the interface→MAC address mapping for the source CI, each ofthe interfaces can update their mapping tables, and can provide updatedmapping tables to their associated switch and/or CI. Each recipientinterface, except the VSRS, forward the decapsulated packet to theirassociated CI. The CI recipient of the forwarded decapsulated packet,and specifically the network interface of that CI, can determine if thetarget IP address of the packet matches the IP address of the CI. If theIP address of the CI associated with that interface does not match thedestination CI IP address specified in the received packet, then nofurther action is taken.

The source VSRS determines that the target IP address matches the IPaddress of the source VSRS, and as indicated in block 1408, the sourceVSRS encapsulates and sends a response, which can be a unicast ARPresponse to the source interface. This response includes the source CIMAC address, IP address, and source CI interface identifier asdestination addresses. The response further includes the source VSRS MACaddress, IP address, and VSRS interface identifier as the sourceaddresses. In some embodiments, the encapsulation of the ARP responsecan comprise Geneve encapsulation.

At block 1410, the source interface receives and decapsulates the ARPresponse. The source interface can further learn the interface-to-MACaddress mapping for the source VSRS based on information contained inthe encapsulation and/or in the encapsulated packet. The sourceinterface can, in some embodiments, forward the ARP response to thesource CI.

At block 1412, the source CI receives the ARP response. In someembodiments, the source CI can update a mapping table based oninformation contained in the ARP response, and specifically based on theMAC address and the IP address of the source VSRS. In some embodiments,for example, the source CI can update its mapping table to reflect theIP-to-MAC address mapping of the source VSRS. The source CI can thensend a packet, which can be any packet including an IP packet, andspecifically an IPv4 or IPv6 packet to the source VSRS. In someembodiments, this can include sending the IP packet with an IP addressof the destination CI as the destination address. In some embodiments,the IP address of the destination CI can be contained in a header of thepacket such as in, for example, an L3 header of the packet. The headercan further include the MAC address of the source VSRS in another headerof the packet, such as, for example, in an L2 header of the packet. Thepacket can further include the MAC address and IP address of the sourceCI as the source MAC address and source IP address.

At block 1414, the source interface can receive the packet from thesource CI. The source interface can encapsulate the packet. The sourceinterface can forward the encapsulated packet to the source VSRS, andspecifically to source VSRS VNIC. The encapsulated packet can include,in addition to the addresses of the packet, the MAC address andinterface identifier of the source CI as the source MAC address andsource interface identifier, and the MAC address and interfaceidentifier of the source VSRS as the destination MAC address anddestination interface identifier.

At block 1416, the source VSRS receives the encapsulated packets. Thesource VSRS decapsulates the packet and strip the packet of any addressinformation relating to the source VSRS including, for example, thesource VSRS IP address, MAC address, and/or source VSRS interfaceidentifier. The source VSRS identifies the destination CI of the packet.In some embodiments, the source VSRS identifies the destination CI ofthe packet based on the IP address of the destination CI included in thepacket. The source VSRS looks up mapping for the packet's destination IPaddress. If the IP address is within the IP address space of the VCN,then the source VSRS looks up the mapping for the packet's destinationIP address in the space of IP addresses for the VCN. The source VSRSthen re-encapsulates the packet with an L3 encapsulation. In someembodiments, this L3 encapsulation can include, for example, a MPLSoUDPL3 encapsulation. The source VSRS then forwards the packet to the VSRSof the destination VLAN (destination VSRS). In some embodiments, thesource VSRS can forward the packet to the destination VSRS such that thedestination VSRS is the tunnel end point (TEP) of the packet. The L3encapsulated packet includes the source CI IP address and MAC address,and the IP address of the destination CI.

At block 1418, the destination VSRS receives the packet and decapsulatesthe packet. In some embodiments, this decapsulation can include removingthe L3 encapsulation. If the destination VSRS knows the IP-to-MAC andthe MAC-to-interface mapping for the destination CI, then thedestination VSRS identifies the interface and MAC address of thedestination CI within the destination VLAN. Alternatively, if thedestination VSRS does not know the destination CI mapping, then thesteps 1612 through 1622 of process 1600 can be performed.

At block 1420, the destination VSRS forwards the packet to thedestination interface of the destination CI. In some embodiments, thiscan include encapsulating the packet with an L2 encapsulation. In someembodiments, the packet can include the IP address and the MAC addressof the source CI and/or the MAC address and interface identifier of thedestination VSRS. In some embodiments, the packet can further includethe MAC address and the interface identifier of the destination CI.

At block 1422, the destination interface receives and decapsulates thepacket. Specifically, the destination VNIC removes the L2 encapsulation.In some embodiments, the destination VNIC forwards the packet to thedestination CI. At block 1424, the destination CI receives the packet.

With reference now to FIG. 15 , a schematic illustration 1500 of theprocess 1400 for inter-VLAN communication is shown. As seen, VLAN A1502-A has a VLAN CIDR of 10.0.3.0/24. VLAN A 1502-A includes a VSRSVNIC A (VRVI A) 1504-A which can be instantiated on one or severalpieces of hardware, and specifically can be instantiated on a serverfleet 1506. VRVI A 1504-A can have an IP address of 10.0.3.1. The VLANcan include compute instance 1 (CI1) 1510 having an IP address of10.0.3.2 and communicatively coupled with NVD 1 (SN1) 1512 which caninstantiate L2 VNIC 1 (VI1) 1514 and L2 switch 1. The VLAN can includecompute instance 2 (CI2) 1520 having an IP address of 10.0.3.3 andcommunicatively coupled with NVD 2 (SN2) 1522 which can instantiate L2VNIC 2 (VI2) 1524 and L2 switch 2. The VLAN can include compute instance3 (CI3) 1530 having an IP address of 10.0.3.4 and communicativelycoupled with NVD 3 (SN3) 1532 which can instantiate L2 VNIC 3 (VI3) 1514and L2 switch 3.

VLAN B 1502-B has a VLAN CIDR of 10.0.34.0/24. VLAN B 1502-B includes aVSRS VNIC B (VRVI B) 1504-B which can be instantiated on one or severalpieces of hardware, and specifically can be instantiated on server fleet1506. VRVI B 1504-B can have an IP address of 10.0.4.1. The VLAN caninclude compute instance 4 (CI4) 1540 having an IP address of 10.0.4.2and communicatively coupled with NVD 4 (SN4) 1542 which can instantiateL2 VNIC 4 (VI3) 1544 and L2 switch 4.

In the example of FIG. 15 , and applying the method 1400 of FIG. 14 ,CI3 1530 is the source CI and VI3 1534 is the source interface. Further,CI4 1540 is the destination CI and VI4 1544 is the destinationinterface. CI3 determines that it does not have an IP-to-MAC mapping forVRVI A 1504-A, resulting in CI3 1530 sending an ARP request. The ARPrequest can be for the address, and specifically can be for the known IPaddress of VRVI A 1504-A. Thus, in some embodiments, the ARP request canbe for 10.0.3.1.

This ARP request is received by SN3 1532 and VI3 1534. VI3 1534replicates the ARP request to create an ARP request for each CI in theVLAN 1502-A. VI3 1534 encapsulates each ARP request with an L2encapsulation and sends an ARP request to each of the interfaces in theVLAN. These encapsulated ARP requests can include informationidentifying the MAC and IP addresses of the source CI, CI3, theinterface identifier of the source interface, VI3, and the target IPaddress. These requests can be sent to each of the interfaces in theVLAN as shown by arrows 1550, and specifically can be sent as a serialunicast such that each interface in the VLAN receives an ARP request.

The interfaces in the VLAN receive the encapsulated ARP request, anddecapsulate the ARP request. Based on information contained in and/orassociated with the ARP request, the interfaces in the VLAN update theirmapping. Specifically, for example, each of VI1 1514, VI2 1524, and VRVIA 1504-A receive a unicast ARP request from CI 3 1530, decapsulate theunicast ARP request, and learn the mapping of the interface-to-MACaddress of the source CI, both of which interface identifier and MACaddress are included in the encapsulated packet.

VRVI A 1504-A determines that its IP address matches the requested IPaddress, and sends an ARP response to CI 3 1530 as indicated with arrow1552. The ARP response from VRVI A 1504-A can be encapsulated by VRVI A1504-A with, for example, an L2 encapsulation, and can be sent as an ARPunicast to the requesting interface, and specifically to VI3. Asindicated earlier in this application, the sending of this ARP responsecan include the providing of the encapsulated ARP response to theassociated switch of VRVI A 1504-A, which can send the encapsulated ARPresponse to VI3.

The ARP response can be received by VI3 and can be decapsulated. VI3 canlearn mapping of the interface-to-MAC of VRVI A 1504-A based on thereceived ARP response, and can provide the updated learned mapping toVI3's associated switch. The decapsulated packet can be provided to CI3.CI3 can learn the IP-to-MAC address mapping of VRVI A 1504-A, and cansend a packet, which packet can be an IP packet such as an IPv4 or Ipv6packet. This packet can have CI3's MAC address and IP address as sourceaddresses. This packet can further include the IP address of thedestination CI, CI4 1540 as the destination address, and can have VRVIA's 1504-A MAC address and IP address.

The packet sent by CI3 can be received by VI3, which can encapsulate thepacket and forward the packet to VRVI A 1504-A. VRVI A 1504-A canreceive the packet, can decapsulate the packet, and can look up mappingfor the packet's destination IP address (the IP address of CI4). In someembodiments, the decapsulating of the packet can include the strippingof the L2 header from the packet, or in other words, strippinginformation relevant to the VLAN A 1502-A from the header. This strippedinformation can include, for example, the MAC address of CI3, theinterface identifier of the interface of VI3, and/or the MAC address andinterface identifier of VRVI A 1504-A. In some embodiments, a VSRS, andthus VRVI A 1504-A can reside in both an L2 network and in an L3network. In the L2 network, thus within the VLAN, the VSRS can utilizeL2 communication protocols, whereas the VSRS can utilize L3communication protocols when communicating with the L3 network. Incontrast to the learning performed in the VLAN, the VSRS can learnmapping to endpoints in the L3 network from the control plane. In someembodiments, for example, the control plane can provide informationmapping IP addresses, and/or MAC addresses of instances in the L3network.

VRVI A 1504-A can look up the mapping for the IP destination addresscontained in the packet, or in other words, can look up the mapping forthe IP address of the destination CI. In some embodiments, looking upthis mapping can include identifying VRVI B 1504-B as the VSRS of VLAN B1502-B. VRVI A 1504-A can encapsulate the packet and forward theencapsulated packet to VRVI B 1504-B, which can be the tunnel end point(TEP) for the destination VLAN and/or destination interface. Theforwarding of this encapsulated packet is indicated with block 1556.This forwarded packet can include the IP address of the source CI, CI3,as the source address, and the IP address of the destination CI, CI4, asthe destination address.

VRVI B 1504-B can receive and decapsulate the packet. VRVI B 1504-B canfurther identify the interface within VLAN B 1502-B corresponding to thedestination IP address. VRVI B 1504-B can encapsulate the packet and addL2 headers for tunneling within VLAN B 1504-B. VRVI B 1504-B can thenforward the packet to destination CI. The destination interface VI4 1544can receive and decapsulate the packet, and can then forward theEthernet frame or packet to the destination CI 1540.

Ingress Packet Flow

With reference now to FIG. 16 , a flowchart illustrating one embodimentof a process 1600 for ingress packet flow is shown. Specifically, FIG.16 shows one embodiment of a process 1600 for ingress packet from asubnet. The process can be performed by all or portions of the system600, and specifically can be performed by entities of a VLAN and someexternal (to the VLAN) source CI, which source CI can reside on an L3subnet.

The process 1600 begins at block 1602, wherein the source L3 CIdetermines to send a packet to a destination CI, and specifically to adestination IP address within a VLAN. The source L3 CI does not know themapping, and thus sends an ARP request for a MAC address of the virtualrouter of the subnet containing the source L3 CI. In some embodiments,the sending of this ARP request can include the sending of the ARPrequest to Ethernet broadcast. At block 1604, the source interface ofsource L3 CI replies to the ARP request with the MAC address of the VR.In some embodiments, the source interface can determine the MAC addressof the VR based on mapping information accessed by the source interface.

Upon receipt of the ARP reply from the source interface, the source L3CI sends an IP packet to the VR as indicated in block 1606. In someembodiments, this can include the source L3 CI sending the packet, andthe source L3 interface receiving, encapsulating, and forwarding thispacket. In some embodiments, the source L3 interface can encapsulate thepacket with an L3 encapsulation, the L3 encapsulation includes theoriginal packet starting from the L3 header. The source L3 interface canforward the packet to the VR. This IP packet can be sent to the VR MACaddress and VR interface, and can include the source L3 CI MAC addressas MAC address and source L3 CI interface identifier as source interfaceidentifier.

The VR receives and decapsulates the packet. The VR then can look up theVNIC mapping for the packets destination's IP address. The VR candetermine that the packet is in a VLAN CIDR, and can then encapsulatethe packet and forward the encapsulated packet to the VSRS of the VLANcontaining the destination CI. In some embodiments, the VR canencapsulate the packet with an L3 encapsulation. The encapsulated packetcan include the destination IP address, the MAC address and interfaceidentifier of the VSRS, and the source IP address.

The VSRS receives and decapsulates the packet as indicated in block1610. When the VSRS knows the mapping of the destination CI, andspecifically the mapping of the destination IP address in the receivedpacket, then the VSRS forwards the IP packet to the TEP for the CIcorresponding to the destination IP address. This can include generatingand encapsulating an L2 packet having a destination MAC corresponding tothe MAC address of the destination CI, and a destination interfaceidentifier corresponding to the destination interface. In embodiment ofingress packet flow, the destination interface is an L2 VNIC.

If the VSRS does not know the destination CI mapping, the process 1600continues at block 1612, wherein the VSRS receives and decapsulates theIP packet.

When the VSRS does not know the destination MAC address-to-VNIC mapping,then the VSRS can perform an interface-to-MAC address learning process.This can include the VSRS sending the packet to all interfaces withinthe VLAN. In some embodiments, this packet can be sent via broadcast toall of the interfaces within the VLAN. This packet can include thedestination MAC and IP addresses, and the interface identifier and MACaddress of the VSRS and the IP address of the source CI. Each of theVNICs in the VLAN can receive this packet and can learn theinterface-to-MAC address mapping of the VSRS.

Each of the receiving VNICs can further decapsulate the packet andforward the decapsulated packet to their associated CI. Each CI caninclude a network interface which can evaluate the forwarded packet. Ifthe network interface determines that the CI having received theforwarded packet does not match the destination MAC and/or IP address,then the packet is dropped. If the network interface determines that theCI having received the forwarded packet matches the destination MACand/or IP address, then the packet is received by the CI. In someembodiments, the CI having a MAC and/or IP address matching thedestination MAC and/or IP address of the packet can send a response tothe VSRS, whereby the VSRS can learn the interface-to-MAC addressmapping and the IP-to-MAC address mapping of the destination CI.

Alternatively, when the VSRS does not know the destination CI mapping,and specifically does not know the mapping of the destination IP addressto a MAC address, then the VSRS suspends the IP packet. The VSRS thengenerates am ARP request for the destination IP address to allinterfaces in the VSRS' VLAN's broadcast domain. This ARP requestincludes the VSRS MAC as the source MAC, the interface identifier of theVSRS interface as the source interface, and the destination IP addressas the target IP address. In some embodiments, this ARP request can bebroadcast to all interfaces in the VLAN.

At block 1614, all interfaces in the VLAN broadcast domain receive anddecapsulate the packet. Each of the interfaces in the VLAN broadcastdomain that receives the packet learns the interface→MAC address mappingof the VSRS as the packet identifies the VSRS MAC address and interfaceidentifier. As part of learning the interface→MAC address mapping forthe VSRS, each of the interfaces can update their mapping tables, andcan provide updated mapping tables to their associated switch and/or CI.

Each recipient interface can forward the decapsulated packet to theirassociated CI. The CI recipient of the forwarded decapsulated packet,and specifically the network interface of that CI, can determine if thedestination IP address of the packet matches the IP address of the CI.If the IP address of the CI associated with that interface does notmatch the destination CI IP address specified in the received packet,then no further action is taken.

If it is determined that the destination CI IP address specified in thereceived packet matches the IP address of the CI associated with therecipient interface (destination CI), then, and as indicated in block1616, the destination CI sends a response, which can be a unicast ARPresponse to the source interface. This response includes the destinationCI MAC and IP addresses, and the VSRS MAC and IP addresses. Thisresponse is received by the destination interface which encapsulates theunicast ARP response as indicated in block 1618. The destinationinterface can forward the encapsulated packet via the destination switchto the VSRS. The encapsulated packet includes the destination CI MAC andIP addresses and destination CI interface identifier, and the VSRS MACand IP addresses and the VSRS interface identifier.

At block 1620, the VSRS, and specifically the VSRS interface, receivesand decapsulates the ARP response. The VSRS, and specifically the VSRSinterface, can further learn the interface-to-MAC address mapping forthe destination CI based on information contained in the encapsulationand/or in the encapsulated packet.

At block 1622, the VSRS can then encapsulate and add L2 headers to thepreviously suspended IP packet, and can then forward the previouslysuspended IP packet to the destination CI, and specifically to thedestination interface. The destination interface can decapsulate thepacket and provide the decapsulated packet to the destination CI. Thispacket forwarded by the VSRS can include the MAC address and interfaceidentifier of the VSRS as the source MAC address and source interfaceidentifier and the MAC address and interface identifier of thedestination CI as the destination MAC address and destination interfaceidentifier. This packet can further include the IP address of thedestination CI and the IP address of the source CI.

The destination interface receives the packet from the VSRS, and thendecapsulates the packet. This decapsulation can include removing theheaders added by the VSRS, which headers can be VCN headers. Thedestination interface can then forward the packet to the destination CI,and the destination CI can receive the packet from the destinationinterface.

With reference now to FIG. 17 , a schematic illustration 1700 of theprocess 1600 for ingress communication is shown. As seen, VLAN A 1502-Ahas a VLAN CIDR of 10.0.3.0/24. VLAN A 1502-A includes a VSRS VNIC A(VRVI A) 1504-A which can be instantiated on one or several pieces ofhardware, and specifically can be instantiated on a server fleet 1506.VRVI A 1504-A can have an IP address of 10.0.3.1. The VLAN can includecompute instance 1 (CI1) 1510 having an IP address of 10.0.3.2 andcommunicatively coupled with NVD 1 (SN1) 1512 which can instantiate L2VNIC 1 (VI1) 1514 and L2 switch 1. The VLAN can include compute instance2 (CI2) 1520 having an IP address of 10.0.3.3 and communicativelycoupled with NVD 2 (SN2) 1522 which can instantiate L2 VNIC 2 (VI2) 1524and L2 switch 2. The VLAN can include compute instance 3 (CI3) 1530having an IP address of 10.0.3.4 and communicatively coupled with NVD 3(SN3) 1532 which can instantiate L2 VNIC 3 (VI3) 1514 and L2 switch 3.

A compute instance, which can be L3 compute instance 4 (CI4) 1744 canreside on a subnet 1739 external to VLAN A 1702-A. CI4 can have an IPaddress of 10.0.4.4, and can be communicatively coupled with NVD 4 (SN4)1742 which can instantiate L3 VNIC 4 (VI4) 1744.

In the example of FIG. 17 , and applying the method 1600 of FIG. 16 ,CI4 1740 is the source CI and VI4 1744 is the source interface. Further,CI3 1730 is the destination CI and VI3 1734 is the destinationinterface. CI4 determines that it does not know mapping to send a packetto CI 3. Thus, CI4 sends an ARP request for the IP address of the subnetvirtual router. In response to this request, VI4, which can, in someembodiments, reside on the NVD containing an instance of the subnetvirtual router, replies directly to CI4 with the VR IP address. CI4learns the VR IP address, and send the packet to the VR. The VR receivesthe packet, and then, based on mapping information, encapsulates thepacket and forwards the packet to the VSRS as indicated in arrow 1748.

The VSRS receives the packet, and if the VSRS does not know the mapping,and specifically does not know the IP-to-MAC address mapping, to thedestination CI, the VSRS suspends the packet, and sends an ARP requestto all interfaces in VLAN A 1704-A. This ARP request includes the VSRSMAC address and interface identifier, and each recipient interface inVLAN A 1704-A learns the mapping of VSRS based on the ARP request. Eachinterface likewise decapsulates the packet and send the packet to itsCI. Upon receipt of the decapsulated packet, CI3 determines that it isthe CI identified in the packet, and CI3 generates an ARP replyanswering with its MAC address. VI3 receives and encapsulates the ARPreply, and forwards the encapsulated ARP reply to the VSRS. Theencapsulated ARP reply includes the MAC address and interface identifierof the VSRS as well as the MAC address and interface identifier of theinterface of CI3.

VSRS receives the ARP reply and learns the mapping of IP address-to-MACaddress and MAC address-to-Interface for CI3. VSRS then forwards thepreviously suspended packet to CI3, which packet is received by VI3,decapsulated, and forwarded to CI3.

Egress Packet Flow

With reference now to FIG. 18 , a flowchart illustrating one embodimentof a process 1800 for egress packet flow from a VLAN is shown. In someembodiments, a packet can egress from the VLAN to flow to another VLAN,to a subnet, or to another network. The process 1800 can be performed byall or portions of the system 600, and specifically can be performed byentities of a VLAN. In some embodiments, parts of the process can beperformed by some external (to the source VLAN) destination CI, whichdestination CI can reside on an L3 subnet.

In some embodiments, the process 1800 can be performed when a computeinstance (source CI) in a VLAN (source VLAN) sends a packet to adestination compute instance (destination CI) outside of the VLAN. Ifthe source CI already knows the mapping of the VSRS in the first VLAN(source VSRS), then the source CI can direct the packet directly to thesource VSRS. If the source CI does not know the mapping of the sourceVSRS, then the source CI and its associated VNIC (source interface orsource VNIC) first learns the mapping, and specifically, the IP-to-MACaddress mapping, of the source VSRS. In embodiment of egress packet flowfrom the L2 VLAN, the source VNIC is an L2 VNIC. The first steps ofprocess 1800, steps 1802 through 1810 relate to the learning of thesource VSRS mapping by the source VNIC and source CI.

The process 1800 begins at block 1802, wherein the source CI initiatesan ARP request. The ARP request is used to determine the IP-to-MACaddress mapping of the source VSRS. The ARP request is sent to Ethernetbroadcast by the source CI. The ARP request includes the source CI MACand IP addresses and interface identifier of the source CI as the sourceaddresses and source interface identifier. The ARP request furtherincludes the IP address of the source VSRS.

At block 1804, the source VNIC receives the ARP request and replicatesthe ARP request. Specifically, the source VNIC receives the ARP requestfrom the source CI, identifies all interfaces on the VLAN, and sends theARP request to all interfaces on the VLAN broadcast domain. Aspreviously mentioned, as the control plane knows all of the interfaceson the VLAN and provides that information to the interfaces with theVLAN, the source interface likewise knows all of the interfaces in theVLAN and is able to send the ARP request to each of the interfaces inthe VLAN. To do this, the source interface replicates the ARP requestand encapsulates one of the ARP requests for each of the interfaces onthe VLAN. Each encapsulated ARP request includes the source CI interfaceidentifier and source CI MAC and/or IP addresses as the sourceaddresses, and the destination CI interface identifier as a destinationaddress. The source CI interface replicates an Ethernet broadcast bysending the replicated and encapsulated ARP requests via serial unicast.The source VNIC can, in some embodiments, encapsulate the ARP requestwith Geneve encapsulation.

At block 1806, all interfaces in the VLAN broadcast domain receive anddecapsulate the packet. Each of the interfaces in the VLAN broadcastdomain that receives the packet learns the interface-to-MAC addressmapping of the source CI as the packet identifies the source CI MACaddress and interface identifier. In addition to this, the VSRS learnsthe IP-to-MAC address mapping of the source CI. As part of learning theinterface-to-MAC address mapping for the source CI, each of theinterfaces can update their mapping tables, and can provide updatedmapping tables to their associated switch and/or CI. Each recipientinterface, except the VSRS, can forward the decapsulated packet to theirassociated CI. The CI recipient of the forwarded decapsulated packet,and specifically the network interface of that CI, can determine if thedestination IP address of the packet matches the IP address of the CI.If the IP address of the CI associated with that interface does notmatch the destination CI IP address specified in the received packet,then no further action is taken.

The source VSRS determines that the destination IP address matches theIP address of the source VSRS, and as indicated in block 1808, thesource VSRS encapsulates and sends a response, which can be a unicastARP response to the source interface. This response includes the sourceCI MAC address and IP address as the destination addresses and thesource CI interface identifier as the destination interface identifier.The response further includes the source VSRS MAC address and IP addressas the source addresses, and the source VSRS interface identifier as thesource interface identifier.

At block 1810, the source interface receives and decapsulates the ARPresponse. The source interface can further learn the interface-to-MACaddress mapping for the source VSRS based on information contained inthe encapsulation and/or in the encapsulated packet. The sourceinterface can, in some embodiments, forward the ARP response to thesource CI.

At block 1812, the source CI receives the ARP response. In someembodiments, the source CI can update a mapping table based oninformation contained in the ARP response, and specifically based on theMAC address of the source VSRS and on the IP address of the source VSRS.The source CI can then send a packet, which can be any packet includingan IP packet, and specifically an IPv4 or IPv6 packet to the sourceVSRS. In some embodiments, this can include sending the IP packet with adestination address of the source VSRS MAC address and source VSRS IPaddress. The packet can further include the MAC address and IP addressof the source CI as the source addresses.

At block 1814, the source interface receives the packet from the sourceCI. The source interface encapsulates the packet. The source interfacecan forward the encapsulated packet to the source VSRS, and specificallyto source VSRS VNIC. The encapsulated packet can include the MAC addressand interface identifier of the source CI as the source MAC address andsource interface identifier, and the MAC address and interfaceidentifier of the source VSRS as the destination MAC address anddestination interface identifier. The encapsulated packet can furtherinclude the IP address of the source CI and the IP address of the sourceVSRS.

At block 1816, the source VSRS receives the encapsulated packet. Thesource VSRS identifies the destination CI of the packet. In someembodiments, the source VSRS identifies the destination CI of the packetbased on the IP address of the destination CI included in the packet.The source VSRS looks up mapping for the packet's destination IPaddress. If the IP address is within the IP address space of the VCN,then the source VSRS looks up the mapping for the packet's destinationIP address in the space of IP addresses for the VCN. The source VSRSthen re-encapsulates the packet with an L3 encapsulation.

The source VSRS then forwards the packet to the destination CI. In someembodiments, this can include forwarding the encapsulated packet to a VRassociated with the subnet containing the destination CI, and/orforwarding the packet to a gateway to allow the packet to exit the VCN.In some embodiments, forwarding the packet to the destination CI cancomprise forwarding the packet to the TEP associated with thedestination CI. The L3 encapsulated packet includes the IP address ofthe source CI as source address and the IP address of the destination CIas the destination address.

At block 1820, the destination interface receives and decapsulates thepacket. In some embodiments, the destination VNIC forwards the packet tothe destination CI. At block 1822, the destination CI receives thepacket.

With reference now to FIG. 19 , a schematic illustration 1900 of theprocess 1800 for egress packet flow is shown. As seen, VLAN A 1502-A hasa VLAN CIDR of 10.0.3.0/24. VLAN A 1502-A includes a VSRS VNIC A (VRVIA) 1504-A which can be instantiated on one or several pieces ofhardware, and specifically can be instantiated on a server fleet 1506.VRVI A 1504-A can have an IP address of 10.0.3.1. The VLAN can includecompute instance 1 (CI1) 1510 having an IP address of 10.0.3.2 andcommunicatively coupled with NVD 1 (SN1) 1512 which can instantiate L2VNIC 1 (VI1) 1514 and L2 switch 1. The VLAN can include compute instance2 (CI2) 1520 having an IP address of 10.0.3.3 and communicativelycoupled with NVD 2 (SN2) 1522 which can instantiate L2 VNIC 2 (VI2) 1524and L2 switch 2. The VLAN can include compute instance 3 (CI3) 1530having an IP address of 10.0.3.4 and communicatively coupled with NVD 3(SN3) 1532 which can instantiate L2 VNIC 3 (VI3) 1514 and L2 switch 3.

A compute instance, which can be L3 compute instance 4 (CI4) 1944 canreside on a subnet 1939 external to VLAN A 1902-A. CI4 can have an IPaddress of 10.0.4.4, and can be communicatively coupled with NVD 4 (SN4)1942 which can instantiate L3 VNIC 4 (VI4) 1944. The subnet 1939 caninclude virtual router (VR) 1948. VR 1948 can have an IP address of10.0.4.1. VR 1948 can be instantiated on, for example, a SmartNIC, aserver, a server fleet, or the like.

In the example of FIG. 19 , and applying the method 1800 of FIG. 18 ,CI3 1930 is the source CI and VI3 1934 is the source interface. Further,CI4 1940 is the destination CI and VI4 1944 is the destinationinterface. CI3 determines that it does not have an IP-to-MAC mapping forVRVI A 1904-A, resulting in CI3 1930 sending an ARP request. The ARPrequest can be for the known address, and specifically can be for theknown IP address of VRVI A 1904-A. Thus, in some embodiments, the ARPrequest can be for 10.0.3.1.

This ARP request is received by SN3 1932 and VI3 1934. VI3 1934replicates the ARP request to create an ARP request for each CI in theVLAN 1902-A. VI3 1934 encapsulates each ARP request with an L2encapsulation and sends an ARP request to each of the interfaces in theVLAN. These encapsulated ARP requests can include informationidentifying the MAC address of the source CI, CI3, the source interfaceidentifier, VI3, and the target IP address. These requests can be sentto each of the interfaces in the VLAN as shown by arrows 1950, andspecifically can be broadcast such that each interface in the VLANreceives an ARP request.

The interfaces in the VLAN receive the encapsulated ARP request, anddecapsulate the ARP request. Based on information contained in and/orassociated with the ARP request, the interfaces in the VLAN update theirmapping. Specifically, for example, each of VD 1914, VI2 1924, and VRVIA 1904-A receive a unicast ARP request from CI 3 1930, decapsulate theunicast ARP request, and learn the mapping of the interface-to-MACaddress of the source CI, both of which interface identifier and MACaddress are included in the encapsulated packet.

VRVI A 1904-A determines that its IP address matches the requested IPaddress, and sends an ARP response to CI 3 1930 as indicated with arrow1952. The ARP response from VRVI A 1904-A can be encapsulated by VRVI A1904-A, and can be sent as an ARP unicast to the requesting interface,and specifically to VI3. As indicated earlier in this application, thesending of this ARP response can include the providing of theencapsulated ARP response to the associated switch of VRVI A 1904-A,which can send the encapsulated ARP response to VI3.

The ARP response can be received by VI3 and can be decapsulated. VI3 canlearn mapping of the interface-to-MAC of VRVI A 1904-A based on thereceived ARP response, and can provide the updated learned mapping toVI3's associated switch. The decapsulated packet can be provided to CI3.CI3 can learn IP-MAC address mapping based on the received packet. CI3can send a packet, which packet can be an IP packet such as an IPv4 orIPv6 packet. This packet can have CI3's MAC and IP addresses as sourceaddresses, and can have the IP address of the destination CI, CI4 1940as the destination address. In some embodiments, the destination addresscan further include VRVI A's 1904-A MAC address.

The packet sent by CI3 can be received by VI3, which can encapsulate thepacket and forward the packet to VRVI A 1904-A. VRVI A 1904-A canreceive the packet, decapsulate the packet, and look up mapping for thepacket's destination IP address (the IP address of CI4). In someembodiments, a VSRS, and thus VRVI A 1904-A can reside in both an L2network and in an L3 network. In the L2 network, thus within the VLAN,the VSRS can utilize L2 communication protocols, whereas the VSRS canutilize L3 communication protocols when communicating with the L3network. In contrast to the learning performed in the VLAN, the VSRS canlearn mapping to endpoints in the L3 network from the L3 control plane.In some embodiments, for example, the L3 control plane can provideinformation mapping IP addresses, MAC addresses, and/or interfaceidentifier of instances in the L3 network.

VRVI A 1904-A can look up the mapping for the IP destination addresscontained in the packet, or in other words, can look up the mapping forthe IP address of the destination CI. In some embodiments, looking upthis mapping can include identifying subnet 1939 on which CI4 1940resides and/or identifying the VR associated with the subnet 1939 onwhich CI4 resides. VRVI A 1904-A can encapsulate the packet and forwardthe encapsulated packet to VR 1948, which can be the tunnel end point(TEP) for the subnet 1939 and/or destination CI 1940. The forwarding ofthis encapsulated packet is indicated with block 1956.

VR 1948 can receive and decapsulate the packet. VR 1948 can furtheridentify the interface within subnet 1939 corresponding to thedestination IP address. VR 1948 can, in some embodiments, be located onthe same NVD as the destination interface VI4 1944. VR 1948 can thusforward the packet directly to destination CI, and specifically to CI41940 as indicated in block 1958.

Interface-Based Access Control List Filtering

The VSRS can provide interface-based Access Control List (ACL)filtering. This can include evaluating an ingress security policy forthe VLAN. This can also include evaluating an egress security policy forthe sender at the VSRS based on learned mapping of interfaces to MAC andIP addresses in the VLAN at the time that the VSRS determines where tosend a received packet. This can result in delayed classification of anACL.

In some embodiments, an ACL can comprise a list of permissionsassociated with objects within the system. These objects can includehardware within the physical network, which hardware can include, forexample, one or several servers, SmartNICs, host machines, or the like.These objects can include one or several virtual objects within thevirtual network. These virtual objects can include, for example, one orseveral interfaces, compute instances, address such as IP address and/orMAC addresses, or the like. In some embodiments, the ACL can specifywhich users, object, and/or system processes are granted access toobjects and/or which operations are allowed on a given object.

The ACL can be specific to one or several CIs. Thus, in someembodiments, some or all of the CIs can have a unique ACL and/or canmaintain a unique ACL. In some embodiments, a CIs ACL may specify towhich interfaces and/or addresses (either MAC or IP) the CI may sendpackets, to which interfaces and/or addresses (either MAC or IP) the CImay not send packets, one or several types of packets which the CI maybe allowed to send to one or several interfaces and/or address, and/orone or several types of packets which the CI may be prohibited fromsending to one or several interfaces. In some embodiments, a CI's ACLmay be stored in a location accessible by other entities within thenetwork, including other entities such as one or several VRs or VSRSeswhich may enforce the ACL.

For example, when receiving a communication from an IP network for oneor several intended recipients within the VLAN, the VSRS can determineand apply filtering and/or limit delivery of the communication based onthe ACL of the sender of that communication. In some embodiments, thiscan be accomplished, for example, by: (1) the VSRS making communicationdecisions based on accessing a copy of a sender's ACL; or (2) the VSRSmaking communication decisions of a communication received by the VSRSbased on information encoded in the packet metadata of thatcommunication.

With reference now to FIG. 20 , a flowchart illustrating one embodimentof a process 2000 for delayed Access Control List (ACL) classificationis shown. The process 2000 can be performed by all or portions of thesystem 600, and specifically can be performed by a VSRS 624, 634.

The process 2000 begins at block 2002, wherein a source CI sends apacket to a destination MAC or IP address. In some embodiments, thesource CI can be external to the VLAN containing the destination MACaddress or IP address to which the packet is sent.

At block 2006, the VSRS of the VLAN containing the destination MAC or IPaddress receives the packet. In some embodiments, the packet can beencapsulated with an L2 encapsulation, and in some embodiments, thepacket can be encapsulated with an L3 encapsulation. The VSRS candecapsulate the packet and identify the source CI as indicated in block2008. Upon identifying the source CI, the VSRS can access an ACL for thesource CI. In some embodiments, for example, the ACL for the source CIcan be stored in a location accessible by the VSRS. In some embodiments,accessing the ACL for the source CI can include retrieving informationin the source CI's ACL, which information can, for example, identify oneor several restrictions for delivery of packets. In some embodiments,this information can include one or several rules based on one orseveral IP addresses, MAC addresses, TCP and/or UDP source anddestination ports, EtherType, or the like.

At block 2010, the VSRS identifies the destination interface for thepacket. In embodiments in which the VSRS does not have mapping for thedestination address, the VSRS can determine the mapping information asdiscussed above with respect to steps 1612 through 1620 of process 1600of FIG. 16 . In embodiments in which the mapping is previously learned,or learned via performing some or all of steps 1612 through 1620 ofprocess 1600, the VSRS can identify the destination interface based onmapping learned by the VSRS through communication with interfaces withinthe VLAN of the VSRS. In some embodiments, identifying the destinationinterface can include looking up the destination interface based on thedestination address, and specifically the destination IP address and/orMAC address of the packet.

At block 2012, the VSRS applies the source CI ACL to the destinationinterface. This can include determining whether any portion of thesource CI ACL is relevant to the destination interface, and if so,applying that portion of the source CI ACL. At block 2014, if thedestination interface complies with the source CI ACL, or in otherwords, if the source CI ACL allows sending of packets from the source CIto the destination interface, then the VSRS forwards the packet to thedestination interface. In some embodiments, this forwarding of thepacket can include encapsulating the packet. In some embodiments, thepacket can be encapsulated according to an L2 encapsulation such as, forexample, an L2 Geneve encapsulation. The VSRS can forward the packet tothe destination interface, and more specifically to the destination CIwhich has the destination interface as its TEP. The destinationinterface can receive the packet, decapsulate the packet, and forwardthe packet to the destination CI.

Alternatively, at block 2016, if the destination interface does notcomply with the source CI ACL, or in other words, if the source CI ACLdoes not allow sending of packets from the source CI to the destinationinterface, then the VSRS drops the packet. In some embodiments, the VSRScan respond to the source CI indicating the dropping of the packetand/or indicating the reason for the dropping of the packet. In someembodiments, the VSRS can update operational metrics/statisticsassociated with the sending interface to reflect the ACL decision.

With reference now to FIG. 21 , a flowchart illustrating one embodimentof a process 2100 for early classification of an ACL and incorporationof that classification in metadata is shown. The process 2100 can beperformed by all or portions of the system 600, and specifically can beperformed by a source CI and a VSRS 624, 634.

At block 2102, the source CI determines to send a packet to adestination CI. In some embodiments, this can include the source CIdetermining to send a packet to a MAC address and/or to an IP address ofa destination CI. The source VNIC can send the packet as indicated inblock 2104. The source VNIC can receive the packet, can evaluate the ACLfor the packet, and can embed ACL information relevant to the packet ina portion of the packet. In some embodiments, this information caninclude one or several rules based on one or several IP addresses, MACaddresses, TCP and/or UDP source and destination ports, EtherType, orthe like. The source VNIC can further encapsulate the packet. In someembodiments, the ACL can be stored as metadata in the encapsulatedpacket, and specifically can be stored in a header of the packet. Insome embodiments, the source CI can be external to the VLAN containingthe destination CI to which the packet is sent.

At block 2106, the VSRS of the VLAN containing the destination MAC or IPaddress receives the packet. In some embodiments, the packet can beencapsulated with an L2 encapsulation, and in some embodiments, thepacket can be encapsulated with an L3 encapsulation. The VSRS candecapsulate the packet. In some embodiments, the VSRS can extractinformation from the packet identifying the destination of the packet,and specifically identifying the destination IP address.

At block 2108, the VSRS identifies the destination interface for thepacket. In embodiments in which the VSRS does not have mapping for thedestination address, the VSRS can determine the mapping information asdiscussed above with respect to steps 1612 through 1620 of process 1600of FIG. 16 . In embodiments in which the mapping is previously learned,or learned via performing some or all of steps 1612 through 1620 ofprocess 1600, the VSRS can identify the destination interface based onmapping learned by the VSRS through communication with interfaces withinthe VLAN of the VSRS. Thus, in some embodiments, the VSRS can determinethat it has mapping information for the destination address, and canidentify the destination interface based on this mapping information. Insome embodiments, identifying the destination interface can includelooking up the destination interface based on the destination address,and specifically the destination IP address and/or MAC address of thepacket.

At block 2110, the VSRS accesses ACL information contained in a portionof the packet. In some embodiments, this can include extracting metadatafrom the packet, and specifically extracting metadata from the packetheader. In some embodiments, this can include decoding informationencoded in the packet metadata in the packet header.

At block 2112, the VSRS applies the ACL information retrieved from theportion of the packet. Specifically, this can include applying thesecurity information encoded in the to the destination interface. Thiscan include determining whether any portion of ACL information isrelevant to the destination interface, and if so, applying that portionof the ACL information. At block 2114, if the destination interfacecomplies with the ACL information and/or with one or several rules ofthe ACL information, or in other words, if the ACL information allowssending of packets from the source CI to the destination interface, thenthe VSRS forwards the packet to the destination interface. In someembodiments, this forwarding of the packet can include encapsulating thepacket. In some embodiments, the packet can be encapsulated according toan L2 encapsulation such as, for example, an L2 Geneve encapsulation.The VSRS can forward the packet to the destination interface, and morespecifically to the destination CI which has the destination interfaceas its TEP. The destination interface can receive the packet,decapsulate the packet, and forward the packet to the destination CI.

Alternatively, at block 2116, if the destination interface does notcomply with the ACL information, or in other words, if the ACLinformation does not allow sending of packets from the source CI to thedestination interface, then the VSRS drops the packet. In someembodiments, the VSRS can respond to the source CI indicating thedropping of the packet and/or indicating the reason for the dropping ofthe packet.

Next Hop Routing

Some embodiments of the VSRS can facilitate next hop routing, andspecifically can delay next hop evaluation until a communication isreceived at the VSRS. Because the sender of a communication outside ofthe VLAN may not know the updated virtual IP addresses for instances inthe VLAN, the sender outside of the VLAN cannot accurately specify nexthop routing.

In some embodiments, the VSRS can facilitate in next hop routingspecification. In some embodiments, this can be accomplished, forexample, by: (1) the sender making an initial specification of next hoprouting for a communication and the VSRS re-evaluating next hopspecification upon receipt of the communication; or (2) delaying nexthop specification until the communication is received by the VSRS.

With reference now to FIG. 22 , a flowchart illustrating one embodimentof a process 2200 for sender-based next hop routing is shown. In someembodiments, this can include the separating of the evaluation of thenext hop route and the specification of the next hop route. This canresult in the source CI evaluating the route policy and encoding nexthop route inside the packet metadata of the virtual packet header of thecommunication. In such embodiments, the packet can include an intendedvirtual IP address of the next hop destination, and the next hop routecan be encoded in the packet metadata

This communication is received by the VSRS, which then uses the encodednext hop route from the packet metadata to determine the instance withinthe VLAN to receive the communication, and the destination virtual IPaddress of that instance. This determination of the instance can use thetables generated and/or curated by the VSRS, and specifically can usetables linking virtual IP addresses, MAC addresses, and/or virtualinterface IDs. With these tables, the VSRS can identify the virtual IPaddress corresponding to the MAC address and/or virtual interface ID ofthe intended next hop destination. In some embodiments, thisidentification of a recipient instance based on the encoded next hoproute contained in the packet metadata by the VSRS can result in theVSRS sending the communication to a different destination virtual IPaddress as the next hop destination indicated by the virtual IP addressin the packet and specified by the sender of the packet.

The process 2200 can be performed by all or portions of the system 600,and specifically can be performed by a source CI and a VSRS 624, 634.

The process begins at block 2202, wherein the source CI can send thepacket. In some embodiments, the source CI can be external to the VLANcontaining the destination MAC address or IP address to which the packetis sent.

At block 2204, the source VNIC can make a routing decision based on oneor several routing rules. In some embodiments, this can include thesource VNIC retrieving and/or accessing one or several routing rules,and then making the routing decision based on those routing rules. Thisrouting decision can be, in some embodiments, a next hop routingdecision for the packet. In some embodiments, these routing rules can bestored in, for example, a route table in the network of the source CI.In some embodiments, this can include, for example, a subnet routetable.

At block 2206, the source VNIC can embed the routing decision into aportion of the packet. In some embodiments, this can includeencapsulating the packet, and embedding the routing decision in metadataof the packet, which metadata can be, for example, encoded in a headerof the packet. After the packet is encapsulated and the routing decisionis embedded in the encapsulated packet, the source VNIC can forward theencapsulated packet to the VSRS.

At block 2208, the VSRS of the VLAN containing the destination MAC or IPaddress receives the packet. In some embodiments, the packet can beencapsulated with an L2 encapsulation, and in some embodiments, thepacket can be encapsulated with an L3 encapsulation. In someembodiments, the receiving of the packet by the VSRS can include thedecapsulating of the packet. In some embodiments, the receiving of thepacket by the VSRS can include the extracting of the routing decisionembedded in a portion of the packet. In some embodiments, this caninclude the decoding of the encoded metadata containing the routingdecision.

At block 2210, the VSRS applies the routing decision to the VSRS routinginformation to determine a destination interface for the packet. In someembodiments, this can include applying the decoded routing decision tothe VSRS routing information to determine a destination CI in the VLANcorresponding to the routing information. At block 2212, the VSRS sendsthe packet to the determined CI in the VLAN. In some embodiments, thiscan include the VSRS forwarding the packet to the destination interface.In some embodiments, this forwarding of the packet can includeencapsulating the packet, which encapsulation can be according to an L2encapsulation such as, for example, an L2 Geneve encapsulation. The VSRScan forward the packet to the destination interface, and morespecifically to the destination CI which has the destination interfaceas its TEP. The destination interface can receive the packet,decapsulate the packet, and forward the packet to the destination CI.

With reference now to FIG. 23 , a flowchart illustrating one embodimentof a process 2300 for delayed next hop routing is shown. The process2300 can be performed by all or portions of the system 600, andspecifically can be performed by a source VNIC and a VSRS 624, 634.

In some embodiments, for example, the source VNIC, can make a routingdecision for a communication transiting the VLAN based on a routing rulethat can be contained in a routing table. This communication can bereceived by the VSRS which can re-evaluate the next hop specification,and can query a copy of that same routing table to identify the routingrule. Based upon this routing rule, the VSRS determines the instancewithin the VLAN corresponding to the routing rule, the virtual IPaddress of that instance, and sends the communication to that instance.The determination of the instance corresponding to the routing rule caninclude the retrieving of information by the VSRS from tables linkingvirtual IP addresses, MAC addresses, and/or virtual interface IDs, anddetermining the virtual IP address associated with the virtual interfaceand/or instance that is the intended next hop destination.

The process 2300 begins at block 2302, wherein the source CI can sendthe packet. In some embodiments, this can include the source CI sendingthe packet to a MAC address and/or to an IP address of a destination CI.In some embodiments, the source CI can be external to the VLANcontaining the destination MAC address or IP address to which the packetis sent.

At block 2204, the source VNIC can receive the packet. The source VNICcan then make a routing decision based on one or several routing rules.In some embodiments, this can include the source VNIC retrieving and/oraccessing one or several routing rules, and then making the routingdecision based on those routing rules. This routing decision can be, insome embodiments, a next hop routing decision for the packet. In someembodiments, these routing rules can be stored in, for example, a routetable in the network of the source CI. In some embodiments, this caninclude, for example, a subnet route table. The source VNIC can thenencapsulate the packet, and can send the packet to the VSRS.

At block 2206, the VSRS of the VLAN containing the destination MAC or IPaddress receives the packet. In some embodiments, the packet can beencapsulated with an L2 encapsulation, and in some embodiments, thepacket can be encapsulated with an L3 encapsulation. In someembodiments, the receiving of the packet by the VSRS can include thedecapsulating of the packet.

At block 2308, the VSRS retrieves routing information relevant to thepacket. In some embodiments, this can include retrieving a routing tableand/or portions of a routing table relevant to the received packet. Insome embodiments, this routing table can be received from, for example,the control plane. Upon receiving the routing information, the VSRSidentifies a routing rule relevant to the received packet.

At block 2310, the VSRS applies the routing rule to the VSRS routinginformation to determine a destination interface in the VLAN for thepacket. In some embodiments, this can include applying the routing ruleto the VSRS routing information to determine a destination CI in theVLAN corresponding to the routing information. At block 2312, the VSRSsends the packet to the determined CI in the VLAN. In some embodiments,this can include the VSRS forwarding the packet to the destinationinterface. In some embodiments, this forwarding of the packet caninclude encapsulating the packet, which encapsulation can be accordingto an L2 encapsulation such as, for example, an L2 Geneve encapsulation.The VSRS can forward the packet to the destination interface, and morespecifically to the destination CI which has the destination interfaceas its TEP. The destination interface can receive the packet,decapsulate the packet, and forward the packet to the destination CI.

Example Implementation

As noted above, infrastructure as a service (IaaS) is one particulartype of cloud computing. IaaS can be configured to provide virtualizedcomputing resources over a public network (e.g., the Internet). In anIaaS model, a cloud computing provider can host the infrastructurecomponents (e.g., servers, storage devices, network nodes (e.g.,hardware), deployment software, platform virtualization (e.g., ahypervisor layer), or the like). In some cases, an IaaS provider mayalso supply a variety of services to accompany those infrastructurecomponents (e.g., billing, monitoring, logging, load balancing andclustering, etc.). Thus, as these services may be policy-driven, IaaSusers may be able to implement policies to drive load balancing tomaintain application availability and performance.

In some instances, IaaS customers may access resources and servicesthrough a wide area network (WAN), such as the Internet, and can use thecloud provider's services to install the remaining elements of anapplication stack. For example, the user can log in to the IaaS platformto create virtual machines (VMs), install operating systems (OSs) oneach VM, deploy middleware such as databases, create storage buckets forworkloads and backups, and even install enterprise software into thatVM. Customers can then use the provider's services to perform variousfunctions, including balancing network traffic, troubleshootingapplication issues, monitoring performance, managing disaster recovery,etc.

In most cases, a cloud computing model will require the participation ofa cloud provider. The cloud provider may, but need not be, a third-partyservice that specializes in providing (e.g., offering, renting, selling)IaaS. An entity might also opt to deploy a private cloud, becoming itsown provider of infrastructure services.

In some examples, IaaS deployment is the process of putting a newapplication, or a new version of an application, onto a preparedapplication server or the like. It may also include the process ofpreparing the server (e.g., installing libraries, daemons, etc.). Thisis often managed by the cloud provider, below the hypervisor layer(e.g., the servers, storage, network hardware, and virtualization).Thus, the customer may be responsible for handling (OS), middleware,and/or application deployment (e.g., on self-service virtual machines(e.g., that can be spun up on demand) or the like.

In some examples, IaaS provisioning may refer to acquiring computers orvirtual hosts for use, and even installing needed libraries or serviceson them. In most cases, deployment does not include provisioning, andthe provisioning may need to be performed first.

In some cases, there are two different challenges for IaaS provisioning.First, there is the initial challenge of provisioning the initial set ofinfrastructure before anything is running. Second, there is thechallenge of evolving the existing infrastructure (e.g., adding newservices, changing services, removing services, etc.) once everythinghas been provisioned. In some cases, these two challenges may beaddressed by enabling the configuration of the infrastructure to bedefined declaratively. In other words, the infrastructure (e.g., whatcomponents are needed and how they interact) can be defined by one ormore configuration files. Thus, the overall topology of theinfrastructure (e.g., what resources depend on which, and how they eachwork together) can be described declaratively. In some instances, oncethe topology is defined, a workflow can be generated that creates and/ormanages the different components described in the configuration files.

In some examples, an infrastructure may have many interconnectedelements. For example, there may be one or more virtual private clouds(VPCs) (e.g., a potentially on-demand pool of configurable and/or sharedcomputing resources), also known as a core network. In some examples,there may also be one or more inbound/outbound traffic group rulesprovisioned to define how the inbound and/or outbound traffic of thenetwork will be set up and one or more virtual machines (VMs). Otherinfrastructure elements may also be provisioned, such as a loadbalancer, a database, or the like. As more and more infrastructureelements are desired and/or added, the infrastructure may incrementallyevolve.

In some instances, continuous deployment techniques may be employed toenable deployment of infrastructure code across various virtualcomputing environments. Additionally, the described techniques canenable infrastructure management within these environments. In someexamples, service teams can write code that is desired to be deployed toone or more, but often many, different production environments (e.g.,across various different geographic locations, sometimes spanning theentire world). However, in some examples, the infrastructure on whichthe code will be deployed must first be set up. In some instances, theprovisioning can be done manually, a provisioning tool may be utilizedto provision the resources, and/or deployment tools may be utilized todeploy the code once the infrastructure is provisioned.

FIG. 24 is a block diagram 2400 illustrating an example pattern of anIaaS architecture, according to at least one embodiment. Serviceoperators 2402 can be communicatively coupled to a secure host tenancy2404 that can include a virtual cloud network (VCN) 2406 and a securehost subnet 2408. In some examples, the service operators 2402 may beusing one or more client computing devices, which may be portablehandheld devices (e.g., an iPhone®, cellular telephone, an iPad®,computing tablet, a personal digital assistant (PDA)) or wearabledevices (e.g., a Google Glass® head mounted display), running softwaresuch as Microsoft Windows Mobile®, and/or a variety of mobile operatingsystems such as iOS, Windows Phone, Android, BlackBerry 8, Palm OS, andthe like, and being Internet, e-mail, short message service (SMS),Blackberry®, or other communication protocol enabled. Alternatively, theclient computing devices can be general purpose personal computersincluding, by way of example, personal computers and/or laptop computersrunning various versions of Microsoft Windows®, Apple Macintosh®, and/orLinux operating systems. The client computing devices can be workstationcomputers running any of a variety of commercially-available UNIX® orUNIX-like operating systems, including without limitation the variety ofGNU/Linux operating systems, such as for example, Google Chrome OS.Alternatively, or in addition, client computing devices may be any otherelectronic device, such as a thin-client computer, an Internet-enabledgaming system (e.g., a Microsoft Xbox gaming console with or without aKinect® gesture input device), and/or a personal messaging device,capable of communicating over a network that can access the VCN 2406and/or the Internet.

The VCN 2406 can include a local peering gateway (LPG) 2410 that can becommunicatively coupled to a secure shell (SSH) VCN 2412 via an LPG 2410contained in the SSH VCN 2412. The SSH VCN 2412 can include an SSHsubnet 2414, and the SSH VCN 2412 can be communicatively coupled to acontrol plane VCN 2416 via the LPG 2410 contained in the control planeVCN 2416. Also, the SSH VCN 2412 can be communicatively coupled to adata plane VCN 2418 via an LPG 2410. The control plane VCN 2416 and thedata plane VCN 2418 can be contained in a service tenancy 2419 that canbe owned and/or operated by the IaaS provider.

The control plane VCN 2416 can include a control plane demilitarizedzone (DMZ) tier 2420 that acts as a perimeter network (e.g., portions ofa corporate network between the corporate intranet and externalnetworks). The DMZ-based servers may have restricted responsibilitiesand help keep breaches contained. Additionally, the DMZ tier 2420 caninclude one or more load balancer (LB) subnet(s) 2422, a control planeapp tier 2424 that can include app subnet(s) 2426, a control plane datatier 2428 that can include database (DB) subnet(s) 2430 (e.g., frontendDB subnet(s) and/or backend DB subnet(s)). The LB subnet(s) 2422contained in the control plane DMZ tier 2420 can be communicativelycoupled to the app subnet(s) 2426 contained in the control plane apptier 2424 and an Internet gateway 2434 that can be contained in thecontrol plane VCN 2416, and the app subnet(s) 2426 can becommunicatively coupled to the DB subnet(s) 2430 contained in thecontrol plane data tier 2428 and a service gateway 2436 and a networkaddress translation (NAT) gateway 2438. The control plane VCN 2416 caninclude the service gateway 2436 and the NAT gateway 2438.

The control plane VCN 2416 can include a data plane mirror app tier 2440that can include app subnet(s) 2426. The app subnet(s) 2426 contained inthe data plane mirror app tier 2440 can include a virtual networkinterface controller (VNIC) 2442 that can execute a compute instance2444. The compute instance 2444 can communicatively couple the appsubnet(s) 2426 of the data plane mirror app tier 2440 to app subnet(s)2426 that can be contained in a data plane app tier 2446.

The data plane VCN 2418 can include the data plane app tier 2446, a dataplane DMZ tier 2448, and a data plane data tier 2450. The data plane DMZtier 2448 can include LB subnet(s) 2422 that can be communicativelycoupled to the app subnet(s) 2426 of the data plane app tier 2446 andthe Internet gateway 2434 of the data plane VCN 2418. The app subnet(s)2426 can be communicatively coupled to the service gateway 2436 of thedata plane VCN 2418 and the NAT gateway 2438 of the data plane VCN 2418.The data plane data tier 2450 can also include the DB subnet(s) 2430that can be communicatively coupled to the app subnet(s) 2426 of thedata plane app tier 2446.

The Internet gateway 2434 of the control plane VCN 2416 and of the dataplane VCN 2418 can be communicatively coupled to a metadata managementservice 2452 that can be communicatively coupled to public Internet2454. Public Internet 2454 can be communicatively coupled to the NATgateway 2438 of the control plane VCN 2416 and of the data plane VCN2418. The service gateway 2436 of the control plane VCN 2416 and of thedata plane VCN 2418 can be communicatively couple to cloud services2456.

In some examples, the service gateway 2436 of the control plane VCN 2416or of the data plane VCN 2418 can make application programming interface(API) calls to cloud services 2456 without going through public Internet2454. The API calls to cloud services 2456 from the service gateway 2436can be one-way: the service gateway 2436 can make API calls to cloudservices 2456, and cloud services 2456 can send requested data to theservice gateway 2436. But, cloud services 2456 may not initiate APIcalls to the service gateway 2436.

In some examples, the secure host tenancy 2404 can be directly connectedto the service tenancy 2419, which may be otherwise isolated. The securehost subnet 2408 can communicate with the SSH subnet 2414 through an LPG2410 that may enable two-way communication over an otherwise isolatedsystem. Connecting the secure host subnet 2408 to the SSH subnet 2414may give the secure host subnet 2408 access to other entities within theservice tenancy 2419.

The control plane VCN 2416 may allow users of the service tenancy 2419to set up or otherwise provision desired resources. Desired resourcesprovisioned in the control plane VCN 2416 may be deployed or otherwiseused in the data plane VCN 2418. In some examples, the control plane VCN2416 can be isolated from the data plane VCN 2418, and the data planemirror app tier 2440 of the control plane VCN 2416 can communicate withthe data plane app tier 2446 of the data plane VCN 2418 via VNICs 2442that can be contained in the data plane mirror app tier 2440 and thedata plane app tier 2446.

In some examples, users of the system, or customers, can make requests,for example create, read, update, or delete (CRUD) operations, throughpublic Internet 2454 that can communicate the requests to the metadatamanagement service 2452. The metadata management service 2452 cancommunicate the request to the control plane VCN 2416 through theInternet gateway 2434. The request can be received by the LB subnet(s)2422 contained in the control plane DMZ tier 2420. The LB subnet(s) 2422may determine that the request is valid, and in response to thisdetermination, the LB subnet(s) 2422 can transmit the request to appsubnet(s) 2426 contained in the control plane app tier 2424. If therequest is validated and requires a call to public Internet 2454, thecall to public Internet 2454 may be transmitted to the NAT gateway 2438that can make the call to public Internet 2454. Memory that may bedesired to be stored by the request can be stored in the DB subnet(s)2430.

In some examples, the data plane mirror app tier 2440 can facilitatedirect communication between the control plane VCN 2416 and the dataplane VCN 2418. For example, changes, updates, or other suitablemodifications to configuration may be desired to be applied to theresources contained in the data plane VCN 2418. Via a VNIC 2442, thecontrol plane VCN 2416 can directly communicate with, and can therebyexecute the changes, updates, or other suitable modifications toconfiguration to, resources contained in the data plane VCN 2418.

In some embodiments, the control plane VCN 2416 and the data plane VCN2418 can be contained in the service tenancy 2419. In this case, theuser, or the customer, of the system may not own or operate either thecontrol plane VCN 2416 or the data plane VCN 2418. Instead, the IaaSprovider may own or operate the control plane VCN 2416 and the dataplane VCN 2418, both of which may be contained in the service tenancy2419. This embodiment can enable isolation of networks that may preventusers or customers from interacting with other users', or othercustomers', resources. Also, this embodiment may allow users orcustomers of the system to store databases privately without needing torely on public Internet 2454, which may not have a desired level ofthreat prevention, for storage.

In other embodiments, the LB subnet(s) 2422 contained in the controlplane VCN 2416 can be configured to receive a signal from the servicegateway 2436. In this embodiment, the control plane VCN 2416 and thedata plane VCN 2418 may be configured to be called by a customer of theIaaS provider without calling public Internet 2454. Customers of theIaaS provider may desire this embodiment since database(s) that thecustomers use may be controlled by the IaaS provider and may be storedon the service tenancy 2419, which may be isolated from public Internet2454.

FIG. 25 is a block diagram 2500 illustrating another example pattern ofan IaaS architecture, according to at least one embodiment. Serviceoperators 2502 (e.g. service operators 2402 of FIG. 24 ) can becommunicatively coupled to a secure host tenancy 2504 (e.g. the securehost tenancy 2404 of FIG. 24 ) that can include a virtual cloud network(VCN) 2506 (e.g. the VCN 2406 of FIG. 24 ) and a secure host subnet 2508(e.g. the secure host subnet 2408 of FIG. 24 ). The VCN 2506 can includea local peering gateway (LPG) 2510 (e.g. the LPG 2410 of FIG. 24 ) thatcan be communicatively coupled to a secure shell (SSH) VCN 2512 (e.g.the SSH VCN 2412 of FIG. 24 ) via an LPG 2410 contained in the SSH VCN2512. The SSH VCN 2512 can include an SSH subnet 2514 (e.g. the SSHsubnet 2414 of FIG. 24 ), and the SSH VCN 2512 can be communicativelycoupled to a control plane VCN 2516 (e.g. the control plane VCN 2416 ofFIG. 24 ) via an LPG 2510 contained in the control plane VCN 2516. Thecontrol plane VCN 2516 can be contained in a service tenancy 2519 (e.g.the service tenancy 2419 of FIG. 24 ), and the data plane VCN 2518 (e.g.the data plane VCN 2418 of FIG. 24 ) can be contained in a customertenancy 2521 that may be owned or operated by users, or customers, ofthe system.

The control plane VCN 2516 can include a control plane DMZ tier 2520(e.g. the control plane DMZ tier 2420 of FIG. 24 ) that can include LBsubnet(s) 2522 (e.g. LB subnet(s) 2422 of FIG. 24 ), a control plane apptier 2524 (e.g. the control plane app tier 2424 of FIG. 24 ) that caninclude app subnet(s) 2526 (e.g. app subnet(s) 2426 of FIG. 24 ), acontrol plane data tier 2528 (e.g. the control plane data tier 2428 ofFIG. 24 ) that can include database (DB) subnet(s) 2530 (e.g. similar toDB subnet(s) 2430 of FIG. 24 ). The LB subnet(s) 2522 contained in thecontrol plane DMZ tier 2520 can be communicatively coupled to the appsubnet(s) 2526 contained in the control plane app tier 2524 and anInternet gateway 2534 (e.g. the Internet gateway 2434 of FIG. 24 ) thatcan be contained in the control plane VCN 2516, and the app subnet(s)2526 can be communicatively coupled to the DB subnet(s) 2530 containedin the control plane data tier 2528 and a service gateway 2536 (e.g. theservice gateway of FIG. 24 ) and a network address translation (NAT)gateway 2538 (e.g. the NAT gateway 2438 of FIG. 24 ). The control planeVCN 2516 can include the service gateway 2536 and the NAT gateway 2538.

The control plane VCN 2516 can include a data plane mirror app tier 2540(e.g. the data plane mirror app tier 2440 of FIG. 24 ) that can includeapp subnet(s) 2526. The app subnet(s) 2526 contained in the data planemirror app tier 2540 can include a virtual network interface controller(VNIC) 2542 (e.g. the VNIC of 2442) that can execute a compute instance2544 (e.g. similar to the compute instance 2444 of FIG. 24 ). Thecompute instance 2544 can facilitate communication between the appsubnet(s) 2526 of the data plane mirror app tier 2540 and the appsubnet(s) 2526 that can be contained in a data plane app tier 2546 (e.g.the data plane app tier 2446 of FIG. 24 ) via the VNIC 2542 contained inthe data plane mirror app tier 2540 and the VNIC 2542 contained in thedata plane app tier 2546.

The Internet gateway 2534 contained in the control plane VCN 2516 can becommunicatively coupled to a metadata management service 2552 (e.g. themetadata management service 2452 of FIG. 24 ) that can becommunicatively coupled to public Internet 2554 (e.g. public Internet2454 of FIG. 24 ). Public Internet 2554 can be communicatively coupledto the NAT gateway 2538 contained in the control plane VCN 2516. Theservice gateway 2536 contained in the control plane VCN 2516 can becommunicatively couple to cloud services 2556 (e.g. cloud services 2456of FIG. 24 ).

In some examples, the data plane VCN 2518 can be contained in thecustomer tenancy 2521. In this case, the IaaS provider may provide thecontrol plane VCN 2516 for each customer, and the IaaS provider may, foreach customer, set up a unique compute instance 2544 that is containedin the service tenancy 2519. Each compute instance 2544 may allowcommunication between the control plane VCN 2516, contained in theservice tenancy 2519, and the data plane VCN 2518 that is contained inthe customer tenancy 2521. The compute instance 2544 may allowresources, that are provisioned in the control plane VCN 2516 that iscontained in the service tenancy 2519, to be deployed or otherwise usedin the data plane VCN 2518 that is contained in the customer tenancy2521.

In other examples, the customer of the IaaS provider may have databasesthat live in the customer tenancy 2521. In this example, the controlplane VCN 2516 can include the data plane mirror app tier 2540 that caninclude app subnet(s) 2526. The data plane mirror app tier 2540 canreside in the data plane VCN 2518, but the data plane mirror app tier2540 may not live in the data plane VCN 2518. That is, the data planemirror app tier 2540 may have access to the customer tenancy 2521, butthe data plane mirror app tier 2540 may not exist in the data plane VCN2518 or be owned or operated by the customer of the IaaS provider. Thedata plane mirror app tier 2540 may be configured to make calls to thedata plane VCN 2518 but may not be configured to make calls to anyentity contained in the control plane VCN 2516. The customer may desireto deploy or otherwise use resources in the data plane VCN 2518 that areprovisioned in the control plane VCN 2516, and the data plane mirror apptier 2540 can facilitate the desired deployment, or other usage ofresources, of the customer.

In some embodiments, the customer of the IaaS provider can apply filtersto the data plane VCN 2518. In this embodiment, the customer candetermine what the data plane VCN 2518 can access, and the customer mayrestrict access to public Internet 2554 from the data plane VCN 2518.The IaaS provider may not be able to apply filters or otherwise controlaccess of the data plane VCN 2518 to any outside networks or databases.Applying filters and controls by the customer onto the data plane VCN2518, contained in the customer tenancy 2521, can help isolate the dataplane VCN 2518 from other customers and from public Internet 2554.

In some embodiments, cloud services 2556 can be called by the servicegateway 2536 to access services that may not exist on public Internet2554, on the control plane VCN 2516, or on the data plane VCN 2518. Theconnection between cloud services 2556 and the control plane VCN 2516 orthe data plane VCN 2518 may not be live or continuous. Cloud services2556 may exist on a different network owned or operated by the IaaSprovider. Cloud services 2556 may be configured to receive calls fromthe service gateway 2536 and may be configured to not receive calls frompublic Internet 2554. Some cloud services 2556 may be isolated fromother cloud services 2556, and the control plane VCN 2516 may beisolated from cloud services 2556 that may not be in the same region asthe control plane VCN 2516. For example, the control plane VCN 2516 maybe located in “Region 1,” and cloud service “Deployment 24,” may belocated in Region 1 and in “Region 2.” If a call to Deployment 24 ismade by the service gateway 2536 contained in the control plane VCN 2516located in Region 1, the call may be transmitted to Deployment 24 inRegion 1. In this example, the control plane VCN 2516, or Deployment 24in Region 1, may not be communicatively coupled to, or otherwise incommunication with, Deployment 24 in Region 2.

FIG. 26 is a block diagram 2600 illustrating another example pattern ofan IaaS architecture, according to at least one embodiment. Serviceoperators 2602 (e.g. service operators 2402 of FIG. 24 ) can becommunicatively coupled to a secure host tenancy 2604 (e.g. the securehost tenancy 2404 of FIG. 24 ) that can include a virtual cloud network(VCN) 2606 (e.g. the VCN 2406 of FIG. 24 ) and a secure host subnet 2608(e.g. the secure host subnet 2408 of FIG. 24 ). The VCN 2606 can includean LPG 2610 (e.g. the LPG 2410 of FIG. 24 ) that can be communicativelycoupled to an SSH VCN 2612 (e.g. the SSH VCN 2412 of FIG. 24 ) via anLPG 2610 contained in the SSH VCN 2612. The SSH VCN 2612 can include anSSH subnet 2614 (e.g. the SSH subnet 2414 of FIG. 24 ), and the SSH VCN2612 can be communicatively coupled to a control plane VCN 2616 (e.g.the control plane VCN 2416 of FIG. 24 ) via an LPG 2610 contained in thecontrol plane VCN 2616 and to a data plane VCN 2618 (e.g. the data plane2418 of FIG. 24 ) via an LPG 2610 contained in the data plane VCN 2618.The control plane VCN 2616 and the data plane VCN 2618 can be containedin a service tenancy 2619 (e.g. the service tenancy 2419 of FIG. 24 ).

The control plane VCN 2616 can include a control plane DMZ tier 2620(e.g. the control plane DMZ tier 2420 of FIG. 24 ) that can include loadbalancer (LB) subnet(s) 2622 (e.g. LB subnet(s) 2422 of FIG. 24 ), acontrol plane app tier 2624 (e.g. the control plane app tier 2424 ofFIG. 24 ) that can include app subnet(s) 2626 (e.g. similar to appsubnet(s) 2426 of FIG. 24 ), a control plane data tier 2628 (e.g. thecontrol plane data tier 2428 of FIG. 24 ) that can include DB subnet(s)2630. The LB subnet(s) 2622 contained in the control plane DMZ tier 2620can be communicatively coupled to the app subnet(s) 2626 contained inthe control plane app tier 2624 and to an Internet gateway 2634 (e.g.the Internet gateway 2434 of FIG. 24 ) that can be contained in thecontrol plane VCN 2616, and the app subnet(s) 2626 can becommunicatively coupled to the DB subnet(s) 2630 contained in thecontrol plane data tier 2628 and to a service gateway 2636 (e.g. theservice gateway of FIG. 24 ) and a network address translation (NAT)gateway 2638 (e.g. the NAT gateway 2438 of FIG. 24 ). The control planeVCN 2616 can include the service gateway 2636 and the NAT gateway 2638.

The data plane VCN 2618 can include a data plane app tier 2646 (e.g. thedata plane app tier 2446 of FIG. 24 ), a data plane DMZ tier 2648 (e.g.the data plane DMZ tier 2448 of FIG. 24 ), and a data plane data tier2650 (e.g. the data plane data tier 2450 of FIG. 24 ). The data planeDMZ tier 2648 can include LB subnet(s) 2622 that can be communicativelycoupled to trusted app subnet(s) 2660 and untrusted app subnet(s) 2662of the data plane app tier 2646 and the Internet gateway 2634 containedin the data plane VCN 2618. The trusted app subnet(s) 2660 can becommunicatively coupled to the service gateway 2636 contained in thedata plane VCN 2618, the NAT gateway 2638 contained in the data planeVCN 2618, and DB subnet(s) 2630 contained in the data plane data tier2650. The untrusted app subnet(s) 2662 can be communicatively coupled tothe service gateway 2636 contained in the data plane VCN 2618 and DBsubnet(s) 2630 contained in the data plane data tier 2650. The dataplane data tier 2650 can include DB subnet(s) 2630 that can becommunicatively coupled to the service gateway 2636 contained in thedata plane VCN 2618.

The untrusted app subnet(s) 2662 can include one or more primary VNICs2664(1)-(N) that can be communicatively coupled to tenant virtualmachines (VMs) 2666(1)-(N). Each tenant VM 2666(1)-(N) can becommunicatively coupled to a respective app subnet 2667(1)-(N) that canbe contained in respective container egress VCNs 2668(1)-(N) that can becontained in respective customer tenancies 2670(1)-(N). Respectivesecondary VNICs 2672(1)-(N) can facilitate communication between theuntrusted app subnet(s) 2662 contained in the data plane VCN 2618 andthe app subnet contained in the container egress VCNs 2668(1)-(N). Eachcontainer egress VCNs 2668(1)-(N) can include a NAT gateway 2638 thatcan be communicatively coupled to public Internet 2654 (e.g. publicInternet 2454 of FIG. 24 ).

The Internet gateway 2634 contained in the control plane VCN 2616 andcontained in the data plane VCN 2618 can be communicatively coupled to ametadata management service 2652 (e.g. the metadata management system2452 of FIG. 24 ) that can be communicatively coupled to public Internet2654. Public Internet 2654 can be communicatively coupled to the NATgateway 2638 contained in the control plane VCN 2616 and contained inthe data plane VCN 2618. The service gateway 2636 contained in thecontrol plane VCN 2616 and contained in the data plane VCN 2618 can becommunicatively couple to cloud services 2656.

In some embodiments, the data plane VCN 2618 can be integrated withcustomer tenancies 2670. This integration can be useful or desirable forcustomers of the IaaS provider in some cases such as a case that maydesire support when executing code. The customer may provide code to runthat may be destructive, may communicate with other customer resources,or may otherwise cause undesirable effects. In response to this, theIaaS provider may determine whether to run code given to the IaaSprovider by the customer.

In some examples, the customer of the IaaS provider may grant temporarynetwork access to the IaaS provider and request a function to beattached to the data plane tier app 2646. Code to run the function maybe executed in the VMs 2666(1)-(N), and the code may not be configuredto run anywhere else on the data plane VCN 2618. Each VM 2666(1)-(N) maybe connected to one customer tenancy 2670. Respective containers2671(1)-(N) contained in the VMs 2666(1)-(N) may be configured to runthe code. In this case, there can be a dual isolation (e.g., thecontainers 2671(1)-(N) running code, where the containers 2671(1)-(N)may be contained in at least the VM 2666(1)-(N) that are contained inthe untrusted app subnet(s) 2662), which may help prevent incorrect orotherwise undesirable code from damaging the network of the IaaSprovider or from damaging a network of a different customer. Thecontainers 2671(1)-(N) may be communicatively coupled to the customertenancy 2670 and may be configured to transmit or receive data from thecustomer tenancy 2670. The containers 2671(1)-(N) may not be configuredto transmit or receive data from any other entity in the data plane VCN2618. Upon completion of running the code, the IaaS provider may kill orotherwise dispose of the containers 2671(1)-(N).

In some embodiments, the trusted app subnet(s) 2660 may run code thatmay be owned or operated by the IaaS provider. In this embodiment, thetrusted app subnet(s) 2660 may be communicatively coupled to the DBsubnet(s) 2630 and be configured to execute CRUD operations in the DBsubnet(s) 2630. The untrusted app subnet(s) 2662 may be communicativelycoupled to the DB subnet(s) 2630, but in this embodiment, the untrustedapp subnet(s) may be configured to execute read operations in the DBsubnet(s) 2630. The containers 2671(1)-(N) that can be contained in theVM 2666(1)-(N) of each customer and that may run code from the customermay not be communicatively coupled with the DB subnet(s) 2630.

In other embodiments, the control plane VCN 2616 and the data plane VCN2618 may not be directly communicatively coupled. In this embodiment,there may be no direct communication between the control plane VCN 2616and the data plane VCN 2618. However, communication can occur indirectlythrough at least one method. An LPG 2610 may be established by the IaaSprovider that can facilitate communication between the control plane VCN2616 and the data plane VCN 2618. In another example, the control planeVCN 2616 or the data plane VCN 2618 can make a call to cloud services2656 via the service gateway 2636. For example, a call to cloud services2656 from the control plane VCN 2616 can include a request for a servicethat can communicate with the data plane VCN 2618.

FIG. 27 is a block diagram 2700 illustrating another example pattern ofan IaaS architecture, according to at least one embodiment. Serviceoperators 2702 (e.g. service operators 2402 of FIG. 24 ) can becommunicatively coupled to a secure host tenancy 2704 (e.g. the securehost tenancy 2404 of FIG. 24 ) that can include a virtual cloud network(VCN) 2706 (e.g. the VCN 2406 of FIG. 24 ) and a secure host subnet 2708(e.g. the secure host subnet 2408 of FIG. 24 ). The VCN 2706 can includean LPG 2710 (e.g. the LPG 2410 of FIG. 24 ) that can be communicativelycoupled to an SSH VCN 2712 (e.g. the SSH VCN 2412 of FIG. 24 ) via anLPG 2710 contained in the SSH VCN 2712. The SSH VCN 2712 can include anSSH subnet 2714 (e.g. the SSH subnet 2414 of FIG. 24 ), and the SSH VCN2712 can be communicatively coupled to a control plane VCN 2716 (e.g.the control plane VCN 2416 of FIG. 24 ) via an LPG 2710 contained in thecontrol plane VCN 2716 and to a data plane VCN 2718 (e.g. the data plane2418 of FIG. 24 ) via an LPG 2710 contained in the data plane VCN 2718.The control plane VCN 2716 and the data plane VCN 2718 can be containedin a service tenancy 2719 (e.g. the service tenancy 2419 of FIG. 24 ).

The control plane VCN 2716 can include a control plane DMZ tier 2720(e.g. the control plane DMZ tier 2420 of FIG. 24 ) that can include LBsubnet(s) 2722 (e.g. LB subnet(s) 2422 of FIG. 24 ), a control plane apptier 2724 (e.g. the control plane app tier 2424 of FIG. 24 ) that caninclude app subnet(s) 2726 (e.g. app subnet(s) 2426 of FIG. 24 ), acontrol plane data tier 2728 (e.g. the control plane data tier 2428 ofFIG. 24 ) that can include DB subnet(s) 2730 (e.g. DB subnet(s) 2630 ofFIG. 26 ). The LB subnet(s) 2722 contained in the control plane DMZ tier2720 can be communicatively coupled to the app subnet(s) 2726 containedin the control plane app tier 2724 and to an Internet gateway 2734 (e.g.the Internet gateway 2434 of FIG. 24 ) that can be contained in thecontrol plane VCN 2716, and the app subnet(s) 2726 can becommunicatively coupled to the DB subnet(s) 2730 contained in thecontrol plane data tier 2728 and to a service gateway 2736 (e.g. theservice gateway of FIG. 24 ) and a network address translation (NAT)gateway 2738 (e.g. the NAT gateway 2438 of FIG. 24 ). The control planeVCN 2716 can include the service gateway 2736 and the NAT gateway 2738.

The data plane VCN 2718 can include a data plane app tier 2746 (e.g. thedata plane app tier 2446 of FIG. 24 ), a data plane DMZ tier 2748 (e.g.the data plane DMZ tier 2448 of FIG. 24 ), and a data plane data tier2750 (e.g. the data plane data tier 2450 of FIG. 24 ). The data planeDMZ tier 2748 can include LB subnet(s) 2722 that can be communicativelycoupled to trusted app subnet(s) 2760 (e.g. trusted app subnet(s) 2660of FIG. 26 ) and untrusted app subnet(s) 2762 (e.g. untrusted appsubnet(s) 2662 of FIG. 26 ) of the data plane app tier 2746 and theInternet gateway 2734 contained in the data plane VCN 2718. The trustedapp subnet(s) 2760 can be communicatively coupled to the service gateway2736 contained in the data plane VCN 2718, the NAT gateway 2738contained in the data plane VCN 2718, and DB subnet(s) 2730 contained inthe data plane data tier 2750. The untrusted app subnet(s) 2762 can becommunicatively coupled to the service gateway 2736 contained in thedata plane VCN 2718 and DB subnet(s) 2730 contained in the data planedata tier 2750. The data plane data tier 2750 can include DB subnet(s)2730 that can be communicatively coupled to the service gateway 2736contained in the data plane VCN 2718.

The untrusted app subnet(s) 2762 can include primary VNICs 2764(1)-(N)that can be communicatively coupled to tenant virtual machines (VMs)2766(1)-(N) residing within the untrusted app subnet(s) 2762. Eachtenant VM 2766(1)-(N) can run code in a respective container2767(1)-(N), and be communicatively coupled to an app subnet 2726 thatcan be contained in a data plane app tier 2746 that can be contained ina container egress VCN 2768. Respective secondary VNICs 2772(1)-(N) canfacilitate communication between the untrusted app subnet(s) 2762contained in the data plane VCN 2718 and the app subnet contained in thecontainer egress VCN 2768. The container egress VCN can include a NATgateway 2738 that can be communicatively coupled to public Internet 2754(e.g. public Internet 2454 of FIG. 24 ).

The Internet gateway 2734 contained in the control plane VCN 2716 andcontained in the data plane VCN 2718 can be communicatively coupled to ametadata management service 2752 (e.g. the metadata management system2452 of FIG. 24 ) that can be communicatively coupled to public Internet2754. Public Internet 2754 can be communicatively coupled to the NATgateway 2738 contained in the control plane VCN 2716 and contained inthe data plane VCN 2718. The service gateway 2736 contained in thecontrol plane VCN 2716 and contained in the data plane VCN 2718 can becommunicatively couple to cloud services 2756.

In some examples, the pattern illustrated by the architecture of blockdiagram 2700 of FIG. 27 may be considered an exception to the patternillustrated by the architecture of block diagram 2600 of FIG. 26 and maybe desirable for a customer of the IaaS provider if the IaaS providercannot directly communicate with the customer (e.g., a disconnectedregion). The respective containers 2767(1)-(N) that are contained in theVMs 2766(1)-(N) for each customer can be accessed in real-time by thecustomer. The containers 2767(1)-(N) may be configured to make calls torespective secondary VNICs 2772(1)-(N) contained in app subnet(s) 2726of the data plane app tier 2746 that can be contained in the containeregress VCN 2768. The secondary VNICs 2772(1)-(N) can transmit the callsto the NAT gateway 2738 that may transmit the calls to public Internet2754. In this example, the containers 2767(1)-(N) that can be accessedin real-time by the customer can be isolated from the control plane VCN2716 and can be isolated from other entities contained in the data planeVCN 2718. The containers 2767(1)-(N) may also be isolated from resourcesfrom other customers.

In other examples, the customer can use the containers 2767(1)-(N) tocall cloud services 2756. In this example, the customer may run code inthe containers 2767(1)-(N) that requests a service from cloud services2756. The containers 2767(1)-(N) can transmit this request to thesecondary VNICs 2772(1)-(N) that can transmit the request to the NATgateway that can transmit the request to public Internet 2754. PublicInternet 2754 can transmit the request to LB subnet(s) 2722 contained inthe control plane VCN 2716 via the Internet gateway 2734. In response todetermining the request is valid, the LB subnet(s) can transmit therequest to app subnet(s) 2726 that can transmit the request to cloudservices 2756 via the service gateway 2736.

It should be appreciated that IaaS architectures 2400, 2500, 2600, 2700depicted in the figures may have other components than those depicted.Further, the embodiments shown in the figures are only some examples ofa cloud infrastructure system that may incorporate an embodiment of thedisclosure. In some other embodiments, the IaaS systems may have more orfewer components than shown in the figures, may combine two or morecomponents, or may have a different configuration or arrangement ofcomponents.

In certain embodiments, the IaaS systems described herein may include asuite of applications, middleware, and database service offerings thatare delivered to a customer in a self-service, subscription-based,elastically scalable, reliable, highly available, and secure manner. Anexample of such an IaaS system is the Oracle Cloud Infrastructure (OCI)provided by the present assignee.

FIG. 28 illustrates an example computer system 2800, in which variousembodiments may be implemented. The system 2800 may be used to implementany of the computer systems described above. As shown in the figure,computer system 2800 includes a processing unit 2804 that communicateswith a number of peripheral subsystems via a bus subsystem 2802. Theseperipheral subsystems may include a processing acceleration unit 2806,an I/O subsystem 2808, a storage subsystem 2818 and a communicationssubsystem 2824. Storage subsystem 2818 includes tangiblecomputer-readable storage media 2822 and a system memory 2810.

Bus subsystem 2802 provides a mechanism for letting the variouscomponents and subsystems of computer system 2800 communicate with eachother as intended. Although bus subsystem 2802 is shown schematically asa single bus, alternative embodiments of the bus subsystem may utilizemultiple buses. Bus subsystem 2802 may be any of several types of busstructures including a memory bus or memory controller, a peripheralbus, and a local bus using any of a variety of bus architectures. Forexample, such architectures may include an Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnect (PCI) bus, which can beimplemented as a Mezzanine bus manufactured to the IEEE P1386.1standard.

Processing unit 2804, which can be implemented as one or more integratedcircuits (e.g., a conventional microprocessor or microcontroller),controls the operation of computer system 2800. One or more processorsmay be included in processing unit 2804. These processors may includesingle core or multicore processors. In certain embodiments, processingunit 2804 may be implemented as one or more independent processing units2832 and/or 2834 with single or multicore processors included in eachprocessing unit. In other embodiments, processing unit 2804 may also beimplemented as a quad-core processing unit formed by integrating twodual-core processors into a single chip.

In various embodiments, processing unit 2804 can execute a variety ofprograms in response to program code and can maintain multipleconcurrently executing programs or processes. At any given time, some orall of the program code to be executed can be resident in processor(s)2804 and/or in storage subsystem 2818. Through suitable programming,processor(s) 2804 can provide various functionalities described above.Computer system 2800 may additionally include a processing accelerationunit 2806, which can include a digital signal processor (DSP), aspecial-purpose processor, and/or the like.

I/O subsystem 2808 may include user interface input devices and userinterface output devices. User interface input devices may include akeyboard, pointing devices such as a mouse or trackball, a touchpad ortouch screen incorporated into a display, a scroll wheel, a click wheel,a dial, a button, a switch, a keypad, audio input devices with voicecommand recognition systems, microphones, and other types of inputdevices. User interface input devices may include, for example, motionsensing and/or gesture recognition devices such as the Microsoft Kinect®motion sensor that enables users to control and interact with an inputdevice, such as the Microsoft Xbox® 360 game controller, through anatural user interface using gestures and spoken commands. Userinterface input devices may also include eye gesture recognition devicessuch as the Google Glass® blink detector that detects eye activity(e.g., ‘blinking’ while taking pictures and/or making a menu selection)from users and transforms the eye gestures as input into an input device(e.g., Google Glass®). Additionally, user interface input devices mayinclude voice recognition sensing devices that enable users to interactwith voice recognition systems (e.g., Siri® navigator), through voicecommands.

User interface input devices may also include, without limitation, threedimensional (3D) mice, joysticks or pointing sticks, gamepads andgraphic tablets, and audio/visual devices such as speakers, digitalcameras, digital camcorders, portable media players, webcams, imagescanners, fingerprint scanners, barcode reader 3D scanners, 3D printers,laser rangefinders, and eye gaze tracking devices. Additionally, userinterface input devices may include, for example, medical imaging inputdevices such as computed tomography, magnetic resonance imaging,position emission tomography, medical ultrasonography devices. Userinterface input devices may also include, for example, audio inputdevices such as MIDI keyboards, digital musical instruments and thelike.

User interface output devices may include a display subsystem, indicatorlights, or non-visual displays such as audio output devices, etc. Thedisplay subsystem may be a cathode ray tube (CRT), a flat-panel device,such as that using a liquid crystal display (LCD) or plasma display, aprojection device, a touch screen, and the like. In general, use of theterm “output device” is intended to include all possible types ofdevices and mechanisms for outputting information from computer system2800 to a user or other computer. For example, user interface outputdevices may include, without limitation, a variety of display devicesthat visually convey text, graphics and audio/video information such asmonitors, printers, speakers, headphones, automotive navigation systems,plotters, voice output devices, and modems.

Computer system 2800 may comprise a storage subsystem 2818 thatcomprises software elements, shown as being currently located within asystem memory 2810. System memory 2810 may store program instructionsthat are loadable and executable on processing unit 2804, as well asdata generated during the execution of these programs.

Depending on the configuration and type of computer system 2800, systemmemory 2810 may be volatile (such as random access memory (RAM)) and/ornon-volatile (such as read-only memory (ROM), flash memory, etc.) TheRAM typically contains data and/or program modules that are immediatelyaccessible to and/or presently being operated and executed by processingunit 2804. In some implementations, system memory 2810 may includemultiple different types of memory, such as static random access memory(SRAM) or dynamic random access memory (DRAM). In some implementations,a basic input/output system (BIOS), containing the basic routines thathelp to transfer information between elements within computer system2800, such as during start-up, may typically be stored in the ROM. Byway of example, and not limitation, system memory 2810 also illustratesapplication programs 2812, which may include client applications, Webbrowsers, mid-tier applications, relational database management systems(RDBMS), etc., program data 2814, and an operating system 2816. By wayof example, operating system 2816 may include various versions ofMicrosoft Windows®, Apple Macintosh®, and/or Linux operating systems, avariety of commercially-available UNIX® or UNIX-like operating systems(including without limitation the variety of GNU/Linux operatingsystems, the Google Chrome® OS, and the like) and/or mobile operatingsystems such as iOS, Windows® Phone, Android® OS, BlackBerry® 28 OS, andPalm® OS operating systems.

Storage subsystem 2818 may also provide a tangible computer-readablestorage medium for storing the basic programming and data constructsthat provide the functionality of some embodiments. Software (programs,code modules, instructions) that when executed by a processor providethe functionality described above may be stored in storage subsystem2818. These software modules or instructions may be executed byprocessing unit 2804. Storage subsystem 2818 may also provide arepository for storing data used in accordance with the presentdisclosure.

Storage subsystem 2800 may also include a computer-readable storagemedia reader 2820 that can further be connected to computer-readablestorage media 2822. Together and, optionally, in combination with systemmemory 2810, computer-readable storage media 2822 may comprehensivelyrepresent remote, local, fixed, and/or removable storage devices plusstorage media for temporarily and/or more permanently containing,storing, transmitting, and retrieving computer-readable information.

Computer-readable storage media 2822 containing code, or portions ofcode, can also include any appropriate media known or used in the art,including storage media and communication media, such as but not limitedto, volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage and/or transmissionof information. This can include tangible computer-readable storagemedia such as RAM, ROM, electronically erasable programmable ROM(EEPROM), flash memory or other memory technology, CD-ROM, digitalversatile disk (DVD), or other optical storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or other tangible computer readable media. This can also includenontangible computer-readable media, such as data signals, datatransmissions, or any other medium which can be used to transmit thedesired information and which can be accessed by computing system 2800.

By way of example, computer-readable storage media 2822 may include ahard disk drive that reads from or writes to non-removable, nonvolatilemagnetic media, a magnetic disk drive that reads from or writes to aremovable, nonvolatile magnetic disk, and an optical disk drive thatreads from or writes to a removable, nonvolatile optical disk such as aCD ROM, DVD, and Blu-Ray® disk, or other optical media.Computer-readable storage media 2822 may include, but is not limited to,Zip® drives, flash memory cards, universal serial bus (USB) flashdrives, secure digital (SD) cards, DVD disks, digital video tape, andthe like. Computer-readable storage media 2822 may also include,solid-state drives (SSD) based on non-volatile memory such asflash-memory based SSDs, enterprise flash drives, solid state ROM, andthe like, SSDs based on volatile memory such as solid state RAM, dynamicRAM, static RAM, DRAM-based SSDs, magnetoresistive RAM (MRAM) SSDs, andhybrid SSDs that use a combination of DRAM and flash memory based SSDs.The disk drives and their associated computer-readable media may providenon-volatile storage of computer-readable instructions, data structures,program modules, and other data for computer system 2800.

Communications subsystem 2824 provides an interface to other computersystems and networks. Communications subsystem 2824 serves as aninterface for receiving data from and transmitting data to other systemsfrom computer system 2800. For example, communications subsystem 2824may enable computer system 2800 to connect to one or more devices viathe Internet. In some embodiments communications subsystem 2824 caninclude radio frequency (RF) transceiver components for accessingwireless voice and/or data networks (e.g., using cellular telephonetechnology, advanced data network technology, such as 3G, 4G or EDGE(enhanced data rates for global evolution), WiFi (IEEE 802.11 familystandards, or other mobile communication technologies, or anycombination thereof), global positioning system (GPS) receivercomponents, and/or other components. In some embodiments communicationssubsystem 2824 can provide wired network connectivity (e.g., Ethernet)in addition to or instead of a wireless interface.

In some embodiments, communications subsystem 2824 may also receiveinput communication in the form of structured and/or unstructured datafeeds 2826, event streams 2828, event updates 2830, and the like onbehalf of one or more users who may use computer system 2800.

By way of example, communications subsystem 2824 may be configured toreceive data feeds 2826 in real-time from users of social networksand/or other communication services such as Twitter® feeds, Facebook®updates, web feeds such as Rich Site Summary (RSS) feeds, and/orreal-time updates from one or more third party information sources.

Additionally, communications subsystem 2824 may also be configured toreceive data in the form of continuous data streams, which may includeevent streams 2828 of real-time events and/or event updates 2830, thatmay be continuous or unbounded in nature with no explicit end. Examplesof applications that generate continuous data may include, for example,sensor data applications, financial tickers, network performancemeasuring tools (e.g. network monitoring and traffic managementapplications), clickstream analysis tools, automobile trafficmonitoring, and the like.

Communications subsystem 2824 may also be configured to output thestructured and/or unstructured data feeds 2826, event streams 2828,event updates 2830, and the like to one or more databases that may be incommunication with one or more streaming data source computers coupledto computer system 2800.

Computer system 2800 can be one of various types, including a handheldportable device (e.g., an iPhone® cellular phone, an iPad® computingtablet, a PDA), a wearable device (e.g., a Google Glass® head mounteddisplay), a PC, a workstation, a mainframe, a kiosk, a server rack, orany other data processing system.

Due to the ever-changing nature of computers and networks, thedescription of computer system 2800 depicted in the figure is intendedonly as a specific example. Many other configurations having more orfewer components than the system depicted in the figure are possible.For example, customized hardware might also be used and/or particularelements might be implemented in hardware, firmware, software (includingapplets), or a combination. Further, connection to other computingdevices, such as network input/output devices, may be employed. Based onthe disclosure and teachings provided herein, a person of ordinary skillin the art will appreciate other ways and/or methods to implement thevarious embodiments.

Although specific embodiments have been described, variousmodifications, alterations, alternative constructions, and equivalentsare also encompassed within the scope of the disclosure. Embodiments arenot restricted to operation within certain specific data processingenvironments, but are free to operate within a plurality of dataprocessing environments. Additionally, although embodiments have beendescribed using a particular series of transactions and steps, it shouldbe apparent to those skilled in the art that the scope of the presentdisclosure is not limited to the described series of transactions andsteps. Various features and aspects of the above-described embodimentsmay be used individually or jointly.

Further, while embodiments have been described using a particularcombination of hardware and software, it should be recognized that othercombinations of hardware and software are also within the scope of thepresent disclosure. Embodiments may be implemented only in hardware, oronly in software, or using combinations thereof. The various processesdescribed herein can be implemented on the same processor or differentprocessors in any combination. Accordingly, where components or modulesare described as being configured to perform certain operations, suchconfiguration can be accomplished, e.g., by designing electroniccircuits to perform the operation, by programming programmableelectronic circuits (such as microprocessors) to perform the operation,or any combination thereof. Processes can communicate using a variety oftechniques including but not limited to conventional techniques forinter process communication, and different pairs of processes may usedifferent techniques, or the same pair of processes may use differenttechniques at different times.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that additions, subtractions, deletions, and other modificationsand changes may be made thereunto without departing from the broaderspirit and scope as set forth in the claims. Thus, although specificdisclosure embodiments have been described, these are not intended to belimiting. Various modifications and equivalents are within the scope ofthe following claims.

The use of the terms “a” and “an” and “the” and similar referents in thecontext of describing the disclosed embodiments (especially in thecontext of the following claims) are to be construed to cover both thesingular and the plural, unless otherwise indicated herein or clearlycontradicted by context. The terms “comprising,” “having,” “including,”and “containing” are to be construed as open-ended terms (i.e., meaning“including, but not limited to,”) unless otherwise noted. The term“connected” is to be construed as partly or wholly contained within,attached to, or joined together, even if there is something intervening.Recitation of ranges of values herein are merely intended to serve as ashorthand method of referring individually to each separate valuefalling within the range, unless otherwise indicated herein and eachseparate value is incorporated into the specification as if it wereindividually recited herein. All methods described herein can beperformed in any suitable order unless otherwise indicated herein orotherwise clearly contradicted by context. The use of any and allexamples, or exemplary language (e.g., “such as”) provided herein, isintended merely to better illuminate embodiments and does not pose alimitation on the scope of the disclosure unless otherwise claimed. Nolanguage in the specification should be construed as indicating anynon-claimed element as essential to the practice of the disclosure.

Disjunctive language such as the phrase “at least one of X, Y, or Z,”unless specifically stated otherwise, is intended to be understoodwithin the context as used in general to present that an item, term,etc., may be either X, Y, or Z, or any combination thereof (e.g., X, Y,and/or Z). Thus, such disjunctive language is not generally intended to,and should not, imply that certain embodiments require at least one ofX, at least one of Y, or at least one of Z to each be present.

Preferred embodiments of this disclosure are described herein, includingthe best mode known for carrying out the disclosure. Variations of thosepreferred embodiments may become apparent to those of ordinary skill inthe art upon reading the foregoing description. Those of ordinary skillshould be able to employ such variations as appropriate and thedisclosure may be practiced otherwise than as specifically describedherein. Accordingly, this disclosure includes all modifications andequivalents of the subject matter recited in the claims appended heretoas permitted by applicable law. Moreover, any combination of theabove-described elements in all possible variations thereof isencompassed by the disclosure unless otherwise indicated herein.

All references, including publications, patent applications, andpatents, cited herein are hereby incorporated by reference to the sameextent as if each reference were individually and specifically indicatedto be incorporated by reference and were set forth in its entiretyherein.

In the foregoing specification, aspects of the disclosure are describedwith reference to specific embodiments thereof, but those skilled in theart will recognize that the disclosure is not limited thereto. Variousfeatures and aspects of the above-described disclosure may be usedindividually or jointly. Further, embodiments can be utilized in anynumber of environments and applications beyond those described hereinwithout departing from the broader spirit and scope of thespecification. The specification and drawings are, accordingly, to beregarded as illustrative rather than restrictive.

What is claimed is:
 1. A computer-implemented method comprising:providing a virtual Layer 3 network in a virtualized cloud environment,the virtual Layer 3 network hosted by an underlying physical network;and providing a virtual Layer 2 network in the virtualized cloudenvironment, the virtual Layer 2 network hosted by the underlyingphysical network, wherein the virtual Layer 2 network comprises aplurality of endpoints comprising a plurality of compute instances,wherein the virtual Layer 2 network comprises a plurality of virtualnetwork interface cards (VNICs), a plurality of switches, and a virtualswitching and routing service (VSRS), the VSRS communicatively couplingthe virtual Layer 2 network to another network, wherein each of theplurality of compute instances is communicatively coupled with a uniquepair comprising a unique one of the plurality of VNICs and a unique oneof the plurality of switches, wherein the VNIC in each unique pair isconnected with the VSRS via the switch of that unique pair.
 2. Themethod of claim 1, wherein the virtual Layer 2 network comprises avirtual local area network (VLAN).
 3. The method of claim 2, wherein theVLAN comprises the plurality of endpoints.
 4. The method of claim 3,wherein the plurality of endpoints comprises a plurality of computeinstances, wherein the VLAN comprises the plurality of VNICs, and theplurality of switches.
 5. The method of claim 4, wherein the pluralityof switches together comprise a distributed switch.
 6. The method ofclaim 5, wherein each of the plurality of switches routes outboundtraffic according to a mapping table received from the VNIC paired withthe switch.
 7. The method of claim 6, wherein the mapping tableidentifies interface-to-MAC address mapping for the endpoints within theVLAN.
 8. The method of claim 4, further comprising instantiating thepair comprising the unique VNIC and the unique switch on a networkvirtualization device (NVD).
 9. The method of claim 4, furthercomprising: receiving a packet addressed for one of the plurality ofcompute instances at the unique VNIC of one of the plurality of computeinstances from another endpoint within the VLAN; and learning with theunique VNIC of the one of the plurality of compute instances mapping ofthe other endpoint.
 10. The method of claim 9, wherein the mapping ofthe other endpoint comprises interface-to-MAC address mapping of theother endpoint.
 11. The method of claim 9, further comprising:decapsulating the received packet with the unique VNIC of the one of theplurality of compute instances; and forwarding the decapsulated packetto the one of the plurality of compute instances.
 12. The method ofclaim 11, further comprising learning with the one of the plurality ofcompute instances IP address-to-MAC address mapping of the otherendpoint.
 13. The method of claim 4, further comprising: sending an IPpacket from a first compute instance in the VLAN, the IP packetcomprising a destination IP address of a second compute instance withinthe VLAN; receiving the IP packet at a first VNIC associated with thefirst compute instance; encapsulating the IP packet at the first VNIC;and forwarding the IP packet to the second compute instance via a firstswitch, wherein the first switch and the first VNIC together for thepair communicatingly coupled with the first compute instance.
 14. Themethod of claim 13, further comprising: receiving the IP packet at asecond VNIC, wherein the second VNIC is associated with the secondcompute instance; decapsulating the IP packet at the second VNIC; andforwarding the IP packet from the second VNIC to the second computeinstance.
 15. The method of claim 1, wherein the virtual Layer 2 networkcomprises a plurality of virtual local area networks (VLANs), andwherein each of the plurality of VLANs comprises a plurality ofendpoints.
 16. The method of claim 15, wherein the plurality of VLANscomprises a first VLAN and a second VLAN, wherein the first VLANcomprises a plurality of first endpoints, and wherein the second VLANcomprises a plurality of second endpoints.
 17. The method of claim 16,wherein each of the plurality of VLANs has a unique identifier.
 18. Themethod of claim 16, wherein one of the plurality of first endpoints inthe first VLAN communicates with one of the plurality of secondendpoints in the second VLAN.
 19. A system comprising: a physicalnetwork comprising: at least one host machine; and a networkvirtualization device, wherein the physical network is configured to:provide a virtual Layer 3 network in a virtualized cloud environment,the virtual Layer 3 network hosted by an underlying physical network;and provide a virtual Layer 2 network in the virtualized cloudenvironment, the virtual Layer 2 network hosted by the underlyingphysical network, wherein the virtual Layer 2 network comprises aplurality of endpoints comprising a plurality of compute instances, aplurality of virtual network interface cards (VNICs), a plurality ofswitches, and a virtual switching and routing service (VSRS), the VSRScommunicatively coupling the virtual Layer 2 network to another network,wherein each of the plurality of compute instances is communicativelycoupled with a unique pair comprising a unique one of the plurality ofVNICs and a unique one of the plurality of switches, wherein the VNIC ineach unique pair is connected with the VSRS via the switch of thatunique pair.
 20. A non-transitory computer-readable storage mediumstoring a plurality of instructions executable by one or moreprocessors, the plurality of instructions when executed by the one ormore processors cause the one or more processors to: provide a virtualLayer 3 network in a virtualized cloud environment, the virtual Layer 3network hosted by an underlying physical network; and provide a virtualLayer 2 network in the virtualized cloud environment, the virtual Layer2 network hosted by the underlying physical network, wherein the virtualLayer 2 network comprises a plurality of endpoints comprising aplurality of compute instances, a plurality of virtual network interfacecards (VNICs), a plurality of switches, and a virtual switching androuting service (VSRS), the VSRS communicatively coupling the virtualLayer 2 network to another network, wherein each of the plurality ofcompute instances is communicatively coupled with a unique paircomprising a unique one of the plurality of VNICs and a unique one ofthe plurality of switches, wherein the VNIC in each unique pair isconnected with the VSRS via the switch of that unique pair.